How do I get the current path of my python file that is currently running.
matt.rasmus at gmail.com
Thu Aug 23 17:06:38 CEST 2007
On Aug 23, 3:33 am, Arnau Sanchez <ar... at ehas.org> wrote:
> Lamonte Harris escribió:
> > Say I start i click on a python file on my desktop, how could I return
> > the path of the current python file thats running?
sys.argv should contain the name of the script as it was called.
os.getcwd() will return the current working directory, which may also
hope this helps.
More information about the Python-list