Getting globals of the caller, not the defining module

Chris Angelico rosuav at gmail.com
Mon Nov 11 06:34:50 EST 2013


On Mon, Nov 11, 2013 at 10:25 PM, Steven D'Aprano
<steve+comp.lang.python at pearwood.info> wrote:
> But since spam is supposed to introspect as much information as possible,
> I don't really want to do that. What (if anything) are my other options?

You're playing with introspection, so I'd look at poking around in the
stack trace. It'll be esoteric, but I think this is the right place to
use it.

ChrisA



More information about the Python-list mailing list