Retrieve source filename

Shrom shrom at admin.zzn.com
Thu Jul 31 09:58:20 EDT 2003


Hi,

I know that you can retrieve main file name with sys.argv[0] and file name
for a module with modulename.__file__ but is there a common way to retrieve
file name for both main program and modules as the __FILE__ constant in PHP
?






More information about the Python-list mailing list