예제 #1
0
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
예제 #2
0
파일: repl.py 프로젝트: svn2github/Xpra
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
예제 #3
0
파일: repl.py 프로젝트: yodamaster/partiwm
def main(cmdline):
    parser = PartiOptionParser()
    (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:
        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_morten(sys.exc_traceback)
        raise
예제 #4
0
파일: main.py 프로젝트: dmgerman/hacking
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