[Tutor] Finding the caller

Kent Johnson kent37 at tds.net
Thu Jul 26 17:05:19 CEST 2007


jay wrote:
> Hello all,
>  
> If I import a module, which has a bunch of simple functions in it, is 
> there an easy way to find the direct caller from inside one of those 
> functions?  I'm looking to know which script has imported and thus 
> called the library function.  Thanks!

http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/66062

Kent


More information about the Tutor mailing list