sys.path in IDLE
missive at frontiernet.net
Sun Dec 28 20:19:14 CET 2003
>>>Am I reading this correctly?
>>>As initialized upon program startup, the first item of this list,
>>>path, is the directory containing the script that was used to
>>>invoke the Python interpreter.
>>>So, sys.path should be the directory that my script is in?
> Back in March 2003, I had the following exchange with Kurt Kaiser on the =
> Idle-dev list. This may clear things up for you.
Thanks for the link.
Now I am thinking that using sys.argv will be a better, more reliable,
way of finding where the running script is located.
Does that way have any pitfalls I should watch for?
More information about the Python-list