Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- import inspect
- def info(msg):
- frm = inspect.stack()[1]
- mod = inspect.getmodule(frm[0])
- print '[%s] %s' % (mod.__name__, msg)
- def call_a():
- info('from call_a')
- def call_b():
- info('from call_b')
- if __name__ == '__main__':
- call_a()
- call_b()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement