def main(cmdline): parser = PartiOptionParser() parser.add_option("--replace", action="store_true", dest="replace", default=False, help="Replace any running window manager with Parti") parser.add_option("-t", "--tray", dest="tray", default="CompositeTest", help="Set default tray type") (options, args) = parser.parse_args(cmdline[1:]) # This means, if an exception propagates to the gtk mainloop, then pass it # on outwards. Or at least it did at one time; dunno if it actually does # anything these days. os.environ["PYGTK_FATAL_EXCEPTIONS"] = "1" try: p = parti.parti_main.Parti(options) p.main() except: if "_PARTI_PDB" in os.environ: import sys, pdb pdb.post_mortem(sys.exc_traceback) raise
def main(cmdline): parser = PartiOptionParser() parser.parse_args(cmdline[1:]) # This means, if an exception propagates to the gtk mainloop, then pass it # on outwards. Or at least it did at one time; dunno if it actually does # anything these days. os.environ["PYGTK_FATAL_EXCEPTIONS"] = "1" try: proxy = parti.bus.get_parti_proxy() print("Using D-Bus to request running Parti spawn a REPL window") proxy.SpawnReplWindow() print("Done") except: if "_PARTI_PDB" in os.environ: import sys, pdb pdb.post_mortem(sys.exc_info()[2]) raise
def main(cmdline): parser = PartiOptionParser() parser.add_option("--replace", action="store_true", dest="replace", default=False, help="Replace any running window manager with Parti") (options, args) = parser.parse_args(cmdline[1:]) # This means, if an exception propagates to the gtk mainloop, then pass it # on outwards. Or at least it did at one time; dunno if it actually does # anything these days. os.environ["PYGTK_FATAL_EXCEPTIONS"] = "1" try: p = parti.parti_main.Parti(options.replace) p.main() except: if "_PARTI_PDB" in os.environ: import sys, pdb pdb.post_mortem(sys.exc_traceback) raise