Chop the names at '(' if any when checking if the name is in the core module

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@73077 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2012-11-30 22:31:30 +00:00
parent ae54ccbb3a
commit 73d6fb4baa

View File

@@ -85,12 +85,17 @@ class FixWxPrefix(object):
# the name as 'wx.Name'
if FixWxPrefix._coreTopLevelNames is None:
self._getCoreTopLevelNames()
if name in FixWxPrefix._coreTopLevelNames:
testName = name
if '(' in name:
testName = name[:name.find('(')]
if testName in FixWxPrefix._coreTopLevelNames:
return 'wx.'+name
else:
return name
def _getCoreTopLevelNames(self):
# Since the real wx.core module may not exist yet, and since actually
# executing code at this point is probably a bad idea, try parsing the