sys.path[0] in IDLE

Lee Harr missive at frontiernet.net
Fri Dec 26 17:25:05 EST 2003


Am I reading this correctly?

http://python.org/doc/current/lib/module-sys.html

"""
As initialized upon program startup, the first item of this list,
path[0], is the directory containing the script that was used to
invoke the Python interpreter.
"""


So, sys.path[0] should be the directory that my script is in?

Even if running the script from IDLE?

Has anyone else had problems with this? Especially on windows?





More information about the Python-list mailing list