IDLE not setting current directory in its path

gujax rjngrj2010 at gmail.com
Mon Jan 30 10:06:54 EST 2012


Hi,
When I open python shell and change to any directory, the sys.path
always shows ' '. This means it has temporarily added the current
directory to its path i.e., sys.path shows [' ', other paths....]

I can then load any module from the current directory even though the
current directory is not listed in the PYTHONPATH..

When I do the same with IDLE, it shows the name of the current
directory i.e.,  ['name1', other paths...] instead of showing [' ',
other paths..].

Therefore, when I change the directory to some other directory say
'name2' and type sys.path, I get the same name as the original
directory which I started with (i.e., name1, while name2 is not added
to the path automatically as done by ' ').

Therefore, I am unable to load any modules from this current changed
directory.

In short how to configure IDLE to automatically add current directory
to its path without typing every time
sys.path.append..
Any help is appreciated.
Thanks



More information about the Python-list mailing list