Getting "current" module file ?
olivier.deckmyn at mail.dotcom.fr
Sat Feb 10 20:03:54 CET 2001
I am looking for a magic function that would tell me where is stored the
file that is currently running.
A good example is better that thousands of words :
here is /home/olivier/python/test1.py :
print "The current module test1 is stored in", magic_get_location()
would get :
The current module test1 is stored in /home/olivier/python/test1.py
Thanx for your support.
ps : Python is real nice piece of code...
More information about the Python-list