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:

import mymod
print mymod.x()

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

More information about the Python-list mailing list