def main(argv = None): if argv is None: argv = sys.argv try: try: opts, args = getopt.getopt(argv[1:], "hw:", ["help", "workspace"]) except getopt.error as msg: raise Usage(msg) except Usage as err: print >> sys.stderr, err.msg print >> sys.stderr, "for help use --help" printHelp() workspaceFile = process_opt(opts, args) app = GMApp(workspaceFile) # suppress wxPython logs q = wx.LogNull() set_raise_on_error(True) # register GUI PID registerPid(os.getpid()) app.MainLoop()
def main(argv=None): if argv is None: argv = sys.argv try: try: opts, args = getopt.getopt(argv[1:], "hw:", ["help", "workspace"]) except getopt.error as msg: raise Usage(msg) except Usage as err: print >> sys.stderr, err.msg print >> sys.stderr, "for help use --help" printHelp() workspaceFile = process_opt(opts, args) app = GMApp(workspaceFile) # suppress wxPython logs q = wx.LogNull() set_raise_on_error(True) # register GUI PID registerPid(os.getpid()) app.MainLoop()