July 13th, 2004, 08:35 AM
Hi, I am receiving an IOError (2) when I try to open() or file(). I have reinstalled Python but cannot remedy this issue. Python says it can't find the file even though the file I am trying to open is in the script's working directory. Thanks.
July 13th, 2004, 10:15 AM
Scripts working directory? As far as i know Python doesn't have a directory called this so, this will mean nothing to Python, try typing the full path to the file and see if that helps. You may also want to check your current working directory using os.getcwd()
July 13th, 2004, 11:42 AM
Right, by 'working directory' I meant the CWD....which shows as the directory where both the script and file reside...
July 13th, 2004, 12:56 PM
Sorry i totaly misunderstood you there . Anyway, maybe you could post some code. Also, what playform and version of Python are you using.
July 13th, 2004, 01:21 PM
Well....anything with the file or open function just fails...
x = file('something.txt', 'r')
y = open('blah.dat', 'r')
...both give IOError 
July 13th, 2004, 01:49 PM
Ok, but what OS and Python version are you running. Also, did you try using the full path to the file?
July 13th, 2004, 05:32 PM
Nevermind...the 'problem' (as it wasn't) was solved. Thank you and sorry for the time.
July 13th, 2004, 05:36 PM
What was the non-problem?
July 14th, 2004, 02:33 AM
Really, that was what i was wondering .