Don't use True, set and join method of string objects which didn't exist in
prehistoric Python versions (such as 1.5 bundled with IRIX) as we can easily
work around their lack by using 1, list and string module join method instead.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63577
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
# Should a funciton be also generated for the CMDs?
# Should a funciton be also generated for the CMDs?
# Map some generic typenames to wx types, using return value syntax
# Map some generic typenames to wx types, using return value syntax
# some non-getter methods are also logically const and this set contains their
# names (notice that it's useless to include here methods manually overridden
# above)
# some non-getter methods are also logically const and this set contains their
# names (notice that it's useless to include here methods manually overridden
# above)
-constNonGetterMethods = set((
+constNonGetterMethods = (
'LineFromPosition',
'PositionFromLine',
'LineLength',
'CanPaste',
'CanRedo',
'CanUndo',
'LineFromPosition',
'PositionFromLine',
'LineLength',
'CanPaste',
'CanRedo',
'CanUndo',
#----------------------------------------------------------------------------
#----------------------------------------------------------------------------
+def joinWithNewLines(values):
+ return string.join(values, '\n')
+
#----------------------------------------------------------------------------
def processVals(values):
#----------------------------------------------------------------------------
def processVals(values):
for x in docs:
text.append('// ' + x)
text.append('#define %s %s' % (name, value))
for x in docs:
text.append('// ' + x)
text.append('#define %s %s' % (name, value))
- return string.join(text, '\n')
+ return joinWithNewLines(text)
#----------------------------------------------------------------------------
#----------------------------------------------------------------------------
# Build docstrings
st = 'DocStr(wxStyledTextCtrl::%s,\n' \
# Build docstrings
st = 'DocStr(wxStyledTextCtrl::%s,\n' \
- '"%s", "");\n' % (name, '\n'.join(docs))
+ '"%s", "");\n' % (name, joinWithNewLines(docs))
dstr.append(st)
# Build the method definition for the .h file
dstr.append(st)
# Build the method definition for the .h file
- return '\n'.join(defs), '\n'.join(imps), '\n'.join(dstr)
+ return joinWithNewLines(defs), joinWithNewLines(imps), joinWithNewLines(dstr)
#----------------------------------------------------------------------------
#----------------------------------------------------------------------------