log caller

Matthew Peter survivedsushi at yahoo.com
Wed Jun 27 23:42:45 CEST 2007


Is it possible to print the function calls to a module? Like:

test.py
import mymod
print mymod.x()


mymod.py
# each time a function is called we print out the called function and module
print 'Func call: %s from %s' % (???, ???)

def x():
     return 'hello'

Where would I pick up the ??? variables? A brief example would be nice too :) Thanks
in advance!


 
____________________________________________________________________________________
The fish are biting. 
Get more visitors on your site using Yahoo! Search Marketing.
http://searchmarketing.yahoo.com/arp/sponsoredsearch_v2.php



More information about the Python-list mailing list