Question about "exec in globals, locals"

Egor Bolonev ebolonev at rol.ru
Fri Jul 4 11:48:35 CEST 2003


Hello, Giles!
You wrote  on 4 Jul 2003 01:41:36 -0700:

[Snipped] 

GB> # Case - 2
GB> myglobals = {'__builtins__' : None, '__name__': None}
GB> mylocals = {}

GB> exec source in myglobals, mylocals
exec source in mylocals
exec source in myglobals
And it work with no errors. But I'm not sure you wish this.

GB> print "Global names are:", myglobals.keys()
GB> print "Local names are:", mylocals.keys()

With best regards, Egor Bolonev.  E-mail: ebolonev at rol.ru [ru eo en]





More information about the Python-list mailing list