How to get path of a .py script

Devrim Erdem devrim at machsim.com
Wed Dec 11 07:15:43 EST 2002


Hi,

On linux I have a script runSomething.py, the script is sometimes
executed from a link on the desktop or from another dir.

How can I get the path of the script file itself so that I can locate
files which are relative to the script file ?

Thanks.



More information about the Python-list mailing list