def realMain(): if __debug__ and application.Globals.options.wing: """ Check for -wing command line argument; if specified, try to connect to an already-running WingIDE instance. See: http://wiki.osafoundation.org/bin/view/Chandler/DebuggingChandler#wingIDE. for details. """ import wingdbstub if __debug__ and application.Globals.options.komodo: """ Check for -komodo command line argument; if specified, try to connect to an already-running Komodo instance. See: http://wiki.osafoundation.org/bin/view/Chandler/DebuggingChandler#Komodo. for details. """ import dbgp.client dbgp.client.brk() from application.Application import wxApplication """ redirect stdio and stderr to a dialog if we're running the debug version. This is done to catch asserts, which otherwise will never get seen by people who run Chandler using the launchers, e.g. Aparna. If you're running release you can also set things up so that you can see stderr and stdout if you run in a shell or from wing with a console. useBestVisual, uses best screen resolutions on some old computers. See wxApp.SetUseBestVisual """ #app = wxApplication(redirect=__debug__, useBestVisual=True) app = wxApplication(redirect=False, useBestVisual=True) app.MainLoop()
def realMain(): if __debug__ and application.Globals.options.wing: """ Check for -wing command line argument; if specified, try to connect to an already-running WingIDE instance. See: http://wiki.osafoundation.org/bin/view/Chandler/DebuggingChandler#wingIDE. for details. """ import wingdbstub if __debug__ and application.Globals.options.komodo: """ Check for -komodo command line argument; if specified, try to connect to an already-running Komodo instance. See: http://wiki.osafoundation.org/bin/view/Chandler/DebuggingChandler#Komodo. for details. """ import dbgp.client dbgp.client.brk() from application.Application import wxApplication """ redirect stdio and stderr to a dialog if we're running the debug version. This is done to catch asserts, which otherwise will never get seen by people who run Chandler using the launchers, e.g. Aparna. If you're running release you can also set things up so that you can see stderr and stdout if you run in a shell or from wing with a console. useBestVisual, uses best screen resolutions on some old computers. See wxApp.SetUseBestVisual """ # app = wxApplication(redirect=__debug__, useBestVisual=True) app = wxApplication(redirect=False, useBestVisual=True) app.MainLoop()
def realMain(): from application import feedback feedback.initRuntimeLog(Globals.options.profileDir) Globals.chandlerDirectory = Utility.locateChandlerDirectory() os.chdir(Globals.chandlerDirectory) Utility.initLogging(Globals.options) if __debug__ and Globals.options.wing: # Check for -wing command line argument; if specified, try to # connect to an already-running WingIDE instance. See # http://wiki.osafoundation.org/bin/view/Chandler/DebuggingChandler#wingIDE # for details. import wingdbstub if __debug__ and Globals.options.komodo: # Check for -komodo command line argument; if specified, try to # connect to an already-running Komodo instance. See # http://wiki.osafoundation.org/bin/view/Chandler/DebuggingChandler#Komodo # for details. import dbgp.client dbgp.client.brk() from application.Application import wxApplication # Redirect stdio and stderr to a dialog if a non-default --catch option # was specified. This is done to catch asserts, which otherwise will # never get seen by people who run Chandler using the launchers, e.g. # Aparna. If you're running release you can also set things up so # that you can see stderr and stdout if you run in a shell or from # wing with a console. redirect = Globals.options.catch == 'normal' # useBestVisual: See wxApp.SetUseBestVisual (Only applicable # for X-Windows based systems) On some older computers the # default visual may only have a depth of 8 although 24-bit # visuals are available. (SGI is notorious for this.) Setting # this to True will cause the best visual to be used instead. # Unfortunatly on some systems with a 32-bit visual available # this can cause problems if the default GTK theme expects to # use only 24. (See Bug #9295) So for now we'll default this # to False. If this becomes a problem in the future then we # should add a command-line option for it or perhaps find a # way to detect if the display depth is < 24. (Note there is # a chicken-and-egg problem with wx.GetDisplayDepth() as it # needs to have the app created before it can be called.) useBestVisual = False app = wxApplication(redirect=redirect, useBestVisual=useBestVisual) exitValue = getattr(app, 'exitValue', 0) if exitValue: return exitValue app.MainLoop() return getattr(app, 'exitValue', 0)