X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1fded56b375bf7a4687af1cdb182899614c1b2a8..ee45c548e61fa0ce1f8adbcf29d7678769f2c0ed:/wxPython/distrib/wx_create.py diff --git a/wxPython/distrib/wx_create.py b/wxPython/distrib/wx_create.py index baf85ae6b7..907f2ddd86 100644 --- a/wxPython/distrib/wx_create.py +++ b/wxPython/distrib/wx_create.py @@ -21,9 +21,6 @@ import os, sys, glob wxmodule_template = """ \"\"\"Renamer stub: provides a way to drop the wx prefix from wxPython objects.\"\"\" -__cvsid__ = \"\x24Id: \x24\" -__revision__ = \"\x24Revision: \x24\"[11:-2] - from wx import _rename from wxPython%(prefix)s import %(suffix)s _rename(globals(), %(suffix)s.__dict__, modulename='%(name)s') @@ -31,6 +28,11 @@ del %(suffix)s del _rename """ +call_main = """ +if __name__ == '__main__': + main() +""" + wxPython_dir = "../wxPython" subpackage_list = ['.', @@ -50,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' + ] @@ -104,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'