find a .py path

Laszlo Nagy gandalf at designaproduct.biz
Fri Jan 5 11:16:08 EST 2007


hg i'rta:
> Hi,
>
> Is there an easy way for a script being executed (from anywhere) to know
> where is is ... something in os.path ?
>   
__file__

You can also use os.argv[0] but that is not the same...

Laszlo



More information about the Python-list mailing list