adam.py... :) If only I knew more about bytecode...
import inspect
import pprint
pp = pprint.PrettyPrinter(depth=6)
f = inspect.currentframe()
c = 0
while f is not None:
c += 1
if c == 20:
print f.f_code
pp.pprint(dict(inspect.getmembers(f.f_code)))
f = f.f_back
Gives you a few clues as well