Using open() under Window 97

Terry Reedy tjreedy at udel.edu
Fri Dec 3 15:28:22 EST 1999


In article <828s0t$ad6$1 at ilana.cenaath.cena.dgac.fr>, kahn at cena.dgac.fr 
says...

>This program run under UNIX
...
>but under Window, even if the file is in current directory I've got the
>fallowing message:
...
>      IOError: [Errno 2] No such file or directory: 'sol.tx>

I suspect the current working directory is different from what you 
think.  (This has happened to me also on WIN97.)

import os; print os.getcwd() # to check (func name may be wrong)
os.chdir('full path') # to set to what you want

TJR






More information about the Python-list mailing list