[Tutor] python: can't open file 'test.py' : [Errno 2] No such file or directory

Alan Gauld alan.gauld at btinternet.com
Wed Oct 1 11:13:21 CEST 2008

"Pierre Dagenais" <pierre.dagenais at ncf.ca> wrote 

> Yes Tim, but both PATH and PYTHONPATH are set 
> to \python25 and \python25\MyCode, so I don't understand 
> why python searches the CWD but neither the path nor 
> pythonpath directories.

Because that's how Windows works, its how Bill Gates 
decided it should be... Its what Windows calls the 
Working Folder and by default for the command prompt 
its the one you are in.

It  can be argued that it is "A Good Thing" since it allows you 
to have several python scripts of the same name and not 
have the wrong script accidentally being started.


Alan G.

More information about the Tutor mailing list