X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/095315e20d117d292ea01f8f964b19c032a0fd56..b4eecebd423df0c6efe86d7658cd3df818d67ed8:/wxPython/demo/MDIWindows.py diff --git a/wxPython/demo/MDIWindows.py b/wxPython/demo/MDIWindows.py index 2f75d8e3dd..4fa3ad01df 100644 --- a/wxPython/demo/MDIWindows.py +++ b/wxPython/demo/MDIWindows.py @@ -35,12 +35,19 @@ class TestPanel(wx.Panel): exe, spawn = self.GetPyExecutable() spawn(os.P_NOWAIT, exe, exe, "MDISashDemo.py") - + # TODO: This hack can be removed once we fix the way the Python + # app bundles are generated so that they are not bundling and + # pointing to an otherwise unused and non-GUI-friendly version of + # Python on OS X. def GetPyExecutable(self): if 'wxMac' in wx.PlatformInfo: # sys.executable will be wrong if running the demo from - # an app bundle. Just find pythonw on the path instead. - return 'pythonw' + sys.version[:3], os.spawnlp + # an app bundle. But the bundle is always using a system + # framework so just hardcode the path to it. + if sys.version[:3] == "2.4": + return '/usr/local/bin/pythonw', os.spawnl + else: + return '/usr/bin/pythonw', os.spawnl else: return sys.executable, os.spawnl