Simple way to get the full path of a running script?

Wolfgang Lipp lipp at epost.de
Mon Dec 29 08:15:45 EST 2003


i normally use the following:

import inspect
print inspect.getsourcefile( lambda:None )

the lambda function could be any object; the getsourcefile returns the
path to the file where that object was defined.

_wolf




More information about the Python-list mailing list