never before this year -- maybe sys.path _used_ to contain the current directory on Linux?).
[Fred L. Drake, Jr.]
It's been a long time since this was the case on Unix of any variety; I *think* this changed to the current state back before 2.0.
[Martin v. Löwis]
Please check again:
[GCC 4.0.2 20050821 (prerelease) (Debian 4.0.1-6)] on linux2 Type "help", "copyright", "credits" or "license" for more information.
import sys sys.path
['', '/usr/lib/python23.zip', '/usr/lib/python2.3', '/usr/lib/python2.3/plat-linux2', '/usr/lib/python2.3/lib-tk', '/usr/lib/python2.3/lib-dynload', '/usr/local/lib/python2.3/site-packages', '/usr/lib/python2.3/site-packages', '/usr/lib/python2.3/site-packages/Numeric', '/usr/lib/python2.3/site-packages/gtk-2.0', '/usr/lib/site-python']
We still have the empty string in sys.path, and it still denotes the current directory.
Well, that's in interactive mode, and I see sys.path == "" on both Windows and Linux then. I don't see "" in sys.path on either box in batch mode, although I do see the absolutized path to the current directory in sys.path in batch mode on Windows but not on Linux -- but Mark Hammond says he doesn't see (any form of) the current directory in sys.path in batch mode on Windows.
It's a bit confusing ;-)