summaryrefslogtreecommitdiffstats
path: root/Lib/plat-irix6
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2006-09-06 06:51:57 (GMT)
committerGeorg Brandl <georg@python.org>2006-09-06 06:51:57 (GMT)
commit7cae87ca7b0a3a7ce497cbd335c8ec82fe680476 (patch)
tree612cc46e728bef49b19f3d4bc26fa4951b2c1c83 /Lib/plat-irix6
parent4e472e05bdddde72d91d6f25d6e048371cf3c9be (diff)
downloadcpython-7cae87ca7b0a3a7ce497cbd335c8ec82fe680476.zip
cpython-7cae87ca7b0a3a7ce497cbd335c8ec82fe680476.tar.gz
cpython-7cae87ca7b0a3a7ce497cbd335c8ec82fe680476.tar.bz2
Patch #1550800: make exec a function.
Diffstat (limited to 'Lib/plat-irix6')
-rw-r--r--Lib/plat-irix6/flp.py6
-rw-r--r--Lib/plat-irix6/panel.py6
2 files changed, 6 insertions, 6 deletions
diff --git a/Lib/plat-irix6/flp.py b/Lib/plat-irix6/flp.py
index f745472..b021622 100644
--- a/Lib/plat-irix6/flp.py
+++ b/Lib/plat-irix6/flp.py
@@ -328,7 +328,7 @@ def _parse_object(file):
#
def create_full_form(inst, (fdata, odatalist)):
form = create_form(fdata)
- exec 'inst.'+fdata.Name+' = form\n'
+ exec('inst.'+fdata.Name+' = form\n')
for odata in odatalist:
create_object_instance(inst, form, odata)
@@ -337,7 +337,7 @@ def create_full_form(inst, (fdata, odatalist)):
# variable.
#
def merge_full_form(inst, form, (fdata, odatalist)):
- exec 'inst.'+fdata.Name+' = form\n'
+ exec('inst.'+fdata.Name+' = form\n')
if odatalist[0].Class != FL.BOX:
raise error, 'merge_full_form() expects FL.BOX as first obj'
for odata in odatalist[1:]:
@@ -373,7 +373,7 @@ def create_object_instance(inst, form, odata):
cbfunc = eval('inst.'+odata.Callback)
obj.set_call_back(cbfunc, odata.Argument)
if odata.Name:
- exec 'inst.' + odata.Name + ' = obj\n'
+ exec('inst.' + odata.Name + ' = obj\n')
#
# Internal _create_object: Create the object and fill options
#
diff --git a/Lib/plat-irix6/panel.py b/Lib/plat-irix6/panel.py
index 12e62a5..1be9146 100644
--- a/Lib/plat-irix6/panel.py
+++ b/Lib/plat-irix6/panel.py
@@ -130,7 +130,7 @@ def assign_members(target, attrlist, exclist, prefix):
stmt = lhs + '=' + repr(value)
if debug: print 'exec', stmt
try:
- exec stmt + '\n'
+ exec(stmt + '\n')
except KeyboardInterrupt: # Don't catch this!
raise KeyboardInterrupt
except:
@@ -186,7 +186,7 @@ def build_subactuators(panel, super_act, al):
if name:
stmt = 'panel.' + name + ' = act'
if debug: print 'exec', stmt
- exec stmt + '\n'
+ exec(stmt + '\n')
if is_endgroup(a):
panel.endgroup()
sub_al = getattrlist(a, 'al')
@@ -236,7 +236,7 @@ def build_panel(descr):
act.addact(panel)
if name:
stmt = 'panel.' + name + ' = act'
- exec stmt + '\n'
+ exec(stmt + '\n')
if is_endgroup(a):
panel.endgroup()
sub_al = getattrlist(a, 'al')