summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2002-01-22 23:24:03 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2002-01-22 23:24:03 (GMT)
commit7ebcbf5cf9baf2016ae23927de9a16cacdea7219 (patch)
tree48f07ab741c4479dc276653827abf4d18f880ae6
parent368875c2d358585e7d3c40c9bf126cc83922a29f (diff)
downloadcpython-7ebcbf5cf9baf2016ae23927de9a16cacdea7219.zip
cpython-7ebcbf5cf9baf2016ae23927de9a16cacdea7219.tar.gz
cpython-7ebcbf5cf9baf2016ae23927de9a16cacdea7219.tar.bz2
Identify() enum values. This was changed in 1.14, but I don't think it is a good idea.
-rw-r--r--Mac/scripts/gensuitemodule.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/Mac/scripts/gensuitemodule.py b/Mac/scripts/gensuitemodule.py
index a1ae774..d9bcdc6 100644
--- a/Mac/scripts/gensuitemodule.py
+++ b/Mac/scripts/gensuitemodule.py
@@ -360,6 +360,10 @@ def compilesuite((suite, fss, modname), major, minor, language, script, fname, b
# Standard_Suite or so). Import everything from our base module
fp.write('from %s import *\n'%basepackage._code_to_fullname[code][0])
basemodule = basepackage._code_to_module[code]
+ elif basepackage and basepackage._code_to_module.has_key(code.lower()):
+ # This is needed by CodeWarrior and some others.
+ fp.write('from %s import *\n'%basepackage._code_to_fullname[code.lower()][0])
+ basemodule = basepackage._code_to_module[code.lower()]
else:
# We are not an extension.
basemodule = None
@@ -744,7 +748,7 @@ class ObjectCompiler:
def compileenumerator(self, item):
[name, code, desc] = item
- self.fp.write("\t%s : %s,\t# %s\n" % (`name`, `code`, desc))
+ self.fp.write("\t%s : %s,\t# %s\n" % (`identify(name)`, `code`, desc))
def checkforenum(self, enum):
"""This enum code is used by an event. Make sure it's available"""