Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Total n00b programming question
Froge Offline
Posting Freak

Posts: 2,955
Threads: 176
Joined: Jul 2012
Reputation: 125
#3
RE: Total n00b programming question

Huh. That works perfectly. Thanks.

However, in my python script there is an instance where I call upon another file to read it:

x = open("test.txt", "r")

And I get the following error from command prompt:

FileNotFoundError: [Errno 2] No such file or directory: "test.txt"


Currently, both the python script I've written as well as text.txt are saved in my python33 folder in C drive, and I've included the location of python33 in "Path" in system variables under advanced systems settings from control panel.

Edit: On another note, if I click on a .py file, the script will execute in command prompt and it does indeed recognize this "text.txt" but closes immediately afterwards for some reason, preventing me from being able to read anything that was printed.

[Image: p229xcq]
(This post was last modified: 06-07-2013, 05:27 PM by Froge.)
06-07-2013, 05:24 PM
Find


Messages In This Thread
Total n00b programming question - by Froge - 06-07-2013, 02:13 AM
RE: Total n00b programming question - by Froge - 06-07-2013, 05:24 PM



Users browsing this thread: 1 Guest(s)