Commit dc3372e9 authored by Guido van Rossum's avatar Guido van Rossum

new exec syntax

parent aada0d51
...@@ -130,7 +130,7 @@ def assign_members(target, attrlist, exclist, prefix): ...@@ -130,7 +130,7 @@ def assign_members(target, attrlist, exclist, prefix):
stmt = lhs + '=' + `value` stmt = lhs + '=' + `value`
if debug: print 'exec', stmt if debug: print 'exec', stmt
try: try:
exec(stmt + '\n') exec stmt + '\n'
except KeyboardInterrupt: # Don't catch this! except KeyboardInterrupt: # Don't catch this!
raise KeyboardInterrupt raise KeyboardInterrupt
except: except:
...@@ -186,7 +186,7 @@ def build_subactuators(panel, super_act, al): ...@@ -186,7 +186,7 @@ def build_subactuators(panel, super_act, al):
if name: if name:
stmt = 'panel.' + name + ' = act' stmt = 'panel.' + name + ' = act'
if debug: print 'exec', stmt if debug: print 'exec', stmt
exec(stmt + '\n') exec stmt + '\n'
if is_endgroup(a): if is_endgroup(a):
panel.endgroup() panel.endgroup()
sub_al = getattrlist(a, 'al') sub_al = getattrlist(a, 'al')
...@@ -236,7 +236,7 @@ def build_panel(descr): ...@@ -236,7 +236,7 @@ def build_panel(descr):
act.addact(panel) act.addact(panel)
if name: if name:
stmt = 'panel.' + name + ' = act' stmt = 'panel.' + name + ' = act'
exec(stmt + '\n') exec stmt + '\n'
if is_endgroup(a): if is_endgroup(a):
panel.endgroup() panel.endgroup()
sub_al = getattrlist(a, 'al') sub_al = getattrlist(a, 'al')
......
...@@ -130,7 +130,7 @@ def assign_members(target, attrlist, exclist, prefix): ...@@ -130,7 +130,7 @@ def assign_members(target, attrlist, exclist, prefix):
stmt = lhs + '=' + `value` stmt = lhs + '=' + `value`
if debug: print 'exec', stmt if debug: print 'exec', stmt
try: try:
exec(stmt + '\n') exec stmt + '\n'
except KeyboardInterrupt: # Don't catch this! except KeyboardInterrupt: # Don't catch this!
raise KeyboardInterrupt raise KeyboardInterrupt
except: except:
...@@ -186,7 +186,7 @@ def build_subactuators(panel, super_act, al): ...@@ -186,7 +186,7 @@ def build_subactuators(panel, super_act, al):
if name: if name:
stmt = 'panel.' + name + ' = act' stmt = 'panel.' + name + ' = act'
if debug: print 'exec', stmt if debug: print 'exec', stmt
exec(stmt + '\n') exec stmt + '\n'
if is_endgroup(a): if is_endgroup(a):
panel.endgroup() panel.endgroup()
sub_al = getattrlist(a, 'al') sub_al = getattrlist(a, 'al')
...@@ -236,7 +236,7 @@ def build_panel(descr): ...@@ -236,7 +236,7 @@ def build_panel(descr):
act.addact(panel) act.addact(panel)
if name: if name:
stmt = 'panel.' + name + ' = act' stmt = 'panel.' + name + ' = act'
exec(stmt + '\n') exec stmt + '\n'
if is_endgroup(a): if is_endgroup(a):
panel.endgroup() panel.endgroup()
sub_al = getattrlist(a, 'al') sub_al = getattrlist(a, 'al')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment