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
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
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
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
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