On Sat, 28 Nov 2009 08:19:02 -0800, Phlip wrote:

> 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.)


See the inspect module:

http://stefaanlippens.net/python_inspect


-- 
Steven
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to