summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2000-08-20 21:59:03 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2000-08-20 21:59:03 (GMT)
commit6aa92c5093143291c6a6cbbca51019d00bfdf45b (patch)
treee23c4e3374d97344ac8ac0aaba22101dd04886c8
parentc15ab036df6820071ee867f5fa9fcfc87b85dcde (diff)
downloadcpython-6aa92c5093143291c6a6cbbca51019d00bfdf45b.zip
cpython-6aa92c5093143291c6a6cbbca51019d00bfdf45b.tar.gz
cpython-6aa92c5093143291c6a6cbbca51019d00bfdf45b.tar.bz2
- identify() enum names.
- don't identify() enum values. - make aetools.Error available in the package module.
-rw-r--r--Mac/scripts/gensuitemodule.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Mac/scripts/gensuitemodule.py b/Mac/scripts/gensuitemodule.py
index 8059cc7..689aeaa 100644
--- a/Mac/scripts/gensuitemodule.py
+++ b/Mac/scripts/gensuitemodule.py
@@ -269,6 +269,7 @@ def compileaete(aete, resinfo, fname):
fp.write("Resource %s resid %d %s\n"%(resinfo[1], resinfo[0], resinfo[2]))
fp.write('"""\n')
fp.write('import aetools\n')
+ fp.write('Error = aetools.Error\n')
for code, modname in suitelist:
fp.write("import %s\n" % modname)
fp.write("\n\n_code_to_module = {\n")
@@ -474,7 +475,7 @@ def compileevent(fp, event, enumsneeded):
ename = a[2][0]
if ename <> '****':
fp.write("\t\taetools.enumsubst(_arguments, %s, _Enum_%s)\n" %
- (`kname`, ename))
+ (`kname`, identify(ename)))
enumsneeded[ename] = 1
fp.write("\n")
#
@@ -741,7 +742,7 @@ class ObjectCompiler:
def compileenumerator(self, item):
[name, code, desc] = item
- self.fp.write("\t%s : %s,\t# %s\n" % (`identify(name)`, `code`, desc))
+ self.fp.write("\t%s : %s,\t# %s\n" % (`name`, `code`, desc))
def checkforenum(self, enum):
"""This enum code is used by an event. Make sure it's available"""