On Thu, 14 Nov 2013 20:56:34 +0000, Rotwang wrote: [...] >> How about this? >> >> # module A.py >> import inspect >> def spam(): >> return inspect.stack()[1][0].f_globals > > Bump. Did this do what you wanted, or not?
Sort of. If anything, it convinced me that I don't, in fact, want what I thought I wanted. I'm still playing around with the code, but it's looking likely that auto- detecting the caller's globals is not really what I want. -- Steven -- https://mail.python.org/mailman/listinfo/python-list