Renamer modules can now optionally have a call to main() added by the

generator script


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@23926 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2003-09-26 03:31:02 +00:00
parent 8cd0be64ff
commit b50c1fd27a
7 changed files with 28 additions and 0 deletions

View File

@@ -28,6 +28,11 @@ del %(suffix)s
del _rename
"""
call_main = """
if __name__ == '__main__':
main()
"""
wxPython_dir = "../wxPython"
subpackage_list = ['.',
@@ -47,6 +52,9 @@ skip_modules = [ '__init__', '__version__',
]
add_call_main = ['py/PyAlaCarte.py', 'py/PyAlaMode.py', 'py/PyCrust.py',
'py/PyFilling.py', 'py/PyShell.py', 'py/PyWrap.py'
]
@@ -101,6 +109,8 @@ for subdir in subpackage_list:
content = wxmodule_template % globals()
f = open(fname, 'w')
f.write(content)
if fname in add_call_main:
f.write(call_main)
f.close()
print fname + ' created'