[IronPython] Calling Scope Globals

Michael Foord fuzzyman at voidspace.org.uk
Sat Mar 10 14:27:03 CET 2007


Hello all,

Occasionally I have code that would like to know what module (scope) 
some code is being called from. In CPython I would do :

calling_scope = sys._getframe(1).f_globals['__name__']

How can I do this in IronPython ? (Ugly hacks accepted.)

Thanks

Michael
http://www.voidspace.org.uk/ironpython/



More information about the Ironpython-users mailing list