From 7ebcbf5cf9baf2016ae23927de9a16cacdea7219 Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Tue, 22 Jan 2002 23:24:03 +0000 Subject: Identify() enum values. This was changed in 1.14, but I don't think it is a good idea. --- Mac/scripts/gensuitemodule.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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""" -- cgit v0.12