filename of calling function?
Phlip
phlip2005 at gmail.com
Sat Nov 28 11:19:02 EST 2009
Consider these two python modules:
aa.py
def a():
print '?'
bb.py
import aa
def bb():
aa.a()
bb()
How do I make the print line emit the filename of bb.py? (It could be
anything.)
I am currently playing with sys.exc_info, but it seems to only emit
the stack between the raise and the except. Could be pilot error, of
course. Thanks for any help!
--
Phlip
http://c2.com/cgi/wiki?ZeekLand
More information about the Python-list
mailing list