Re: Don't understand syntax error: unqualified exec is not allowed ..

2008-10-21 Thread Stef Mientki
Terry Reedy wrote: Stef Mientki wrote: import sys p_locals = sys._getframe(1).f_locals Which locals does this get you? __init__'s? (locals()?) AFAIK locals() == sys._getframe(0).f_locals Then it is not clear to me which locals your are getting. The locals of the code block where th

Re: Don't understand syntax error: unqualified exec is not allowed ..

2008-10-21 Thread Terry Reedy
Stef Mientki wrote: import sys p_locals = sys._getframe(1).f_locals Which locals does this get you? __init__'s? (locals()?) AFAIK locals() == sys._getframe(0).f_locals Then it is not clear to me which locals your are getting. p_globals = sys._getframe(1).f_globals Isn't this j

Re: Don't understand syntax error: unqualified exec is not allowed ..

2008-10-21 Thread Stef Mientki
Terry Reedy wrote: Stef Mientki wrote: hello, I've syntax error which I totally don't understand: ## mainfile : import test_upframe2 if __name__ == '__main__': var1 = 33 code = 'print var1 + 3 \n' test_upframe2.Do_Something_In_Parent_NameSpace ( code ) ### file = test_upfr

Re: Don't understand syntax error: unqualified exec is not allowed ..

2008-10-20 Thread Terry Reedy
Stef Mientki wrote: hello, I've syntax error which I totally don't understand: ## mainfile : import test_upframe2 if __name__ == '__main__': var1 = 33 code = 'print var1 + 3 \n' test_upframe2.Do_Something_In_Parent_NameSpace ( code ) ### file = test_upframe2 : class Do_Some

Don't understand syntax error: unqualified exec is not allowed ..

2008-10-20 Thread Stef Mientki
hello, I've syntax error which I totally don't understand: ## mainfile : import test_upframe2 if __name__ == '__main__': var1 = 33 code = 'print var1 + 3 \n' test_upframe2.Do_Something_In_Parent_NameSpace ( code ) ### file = test_upframe2 : class Do_Something_In_Parent_NameS