How to get the package, file, and line of a method/function invocant?

metaperl metaperl at gmail.com
Tue Sep 12 15:07:32 CEST 2006


Miki wrote:
> > > I am looking for something like the caller() routine in Perl:
> > >    http://perldoc.perl.org/functions/caller.html
> >
> > Look at the inspect module in Python's standard library.
> Or is you're feeling lazy, have a look at the "here" function found in
> http://www.unixreview.com/documents/s=9133/ur0404e/ur0404e_listing1.htm

Thanks for the link. I would've never figured out how to use inspect on
my own.




More information about the Python-list mailing list