program path

Peter Hansen peter at engcorp.com
Sat Jun 7 21:00:44 EDT 2003


kpop wrote:
> 
> how do i get the path of the python script thats running  from within
> python.

Do you mean the path of any Python module that is imported, or just
the main script.  For the latter, use sys.argv[0].

-Peter




More information about the Python-list mailing list