예제 #1
0
def init():
    # Needed for feedback
    if not DEBUG:
        try:
            ferr = open("bug.log", "at")
            sys.stderr = ferr
            okFerr = True
        except:
            okFerr = False

    mainProcesador = Procesador.Procesador()
    mainProcesador.setVersion(VERSION)
    runSound = Sonido.RunSound()
    resp = Gui.lanzaGUI(mainProcesador)
    runSound.close()
    mainProcesador.pararMotores()
    mainProcesador.quitaKibitzers()

    # Needed for feedback
    if not DEBUG:
        if okFerr:
            ferr.close()

    if resp == kFinReinicio:
        if sys.argv[0].endswith(".py"):
            exe = "./%s" % sys.argv[0]
        else:
            exe = "Lucas.exe" if VarGen.isWindows else "Lucas"
        VarGen.startfile(exe)
예제 #2
0
def init():
    if not DEBUG:
        sys.stderr = Util.Log("bug.log")

    mainProcesador = Procesador.Procesador()
    mainProcesador.setVersion(VERSION)
    runSound = Sonido.RunSound()
    resp = Gui.lanzaGUI(mainProcesador)
    runSound.close()
    mainProcesador.pararMotores()
    mainProcesador.quitaKibitzers()

    if resp == kFinReinicio:
        if sys.argv[0].endswith(".py"):
            exe = os.path.abspath(sys.argv[0])
        else:
            exe = "Lucas.exe" if VarGen.isWindows else "Lucas"
        VarGen.startfile(exe)