I would like to be able to dynamically retrieve the current executing module or class name from within an imported module. Here is some code:
foo.py:
It's been a while since I've done python, but I believe that you can get access to the globals and locals of a caller through its traceback.