log caller

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Matthew Peter

    #1

    log caller

    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.

Working...