#!/usr/bin/python2
def log(func):
def wrappedFunc():
print “*** %s() called” % func.__name__
return func()
return wrappedFunc
@log
def foo():
print “inside foo()”
foo()
r@h:~/script/python $ python2 /tmp/foo.py *** foo() called inside foo()