コード例 #1
0
ファイル: Init.py プロジェクト: garyliu33/lucaschess
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
ファイル: Init.py プロジェクト: cdcupt/lucaschess
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)
コード例 #3
0
ファイル: Procesador.py プロジェクト: JERUKA9/lucaschess
    def informacion(self):

        liBlog = (
            ( "Director ", "http://lucaschess.blogspot.com.es/2012/05/director.html" ),
            ("Tactical training with your own blunders",
             "http://lucaschess.blogspot.com.es/2011/11/tactical-training-with-your-own.html" ),
            ( "Announcements sounds", "http://lucaschess.blogspot.com.es/2011/10/announcements-sounds.html" ),
            ("Personalities in Game against an engine of your choice",
             "http://lucaschess.blogspot.com.es/2011/09/version-60-beta-1-personalities.html" ),
            ("Training favourites and Your daily test",
             "http://lucaschess.blogspot.com.es/2011/09/version-60-dev4-with-favourites-and.html" ),
            (
                "Captured material panel",
                "http://lucaschess.blogspot.com.es/2011/06/version-53-captures-and-more.html" ),
            ("Learn openings by repetition",
             "http://lucaschess.blogspot.com.es/2011/06/version-52-standard-openings.html" ),
            ( "Kibitzers", "http://lucaschess.blogspot.com.es/2011/06/version-51-with-kibitzers.html" ),
            ("Training mate positions",
             "http://lucaschess.blogspot.com.es/2011/03/new-option-training-mate-positions.html" ),
        )

        menu = QTVarios.LCMenu(self.pantalla)

        menu.opcion( "docs", _("Documents"), Iconos.Ayuda())
        menu.separador()
        menu.opcion("web", _("Homepage"), Iconos.Web())
        menu.separador()
        menu1 = menu.submenu("Fresh news", Iconos.Blog())
        menu1.opcion("blog", "Fresh news", Iconos.Blog())
        menu1.separador()
        for txt, lnk in liBlog:
            menu1.opcion(lnk, txt, Iconos.PuntoAzul())
        menu.separador()
        # menu.opcion("downloads", _("Downloads"), Iconos.Downloads())
        # menu.separador()
        menu.opcion("mail", _("Contact") + " (%s)" % "*****@*****.**", Iconos.Mail())
        menu.separador()

        menu.opcion("acercade", _("About"), Iconos.Aplicacion())

        resp = menu.lanza()
        if resp is None:
            return
        elif resp == "acercade":
            self.acercade()
        elif resp == "docs":
            VarGen.startfile("%s/docs" % self.web)
        elif resp == "blog":
            VarGen.startfile(self.blog)
        elif resp.startswith("http"):
            VarGen.startfile(resp)
        elif resp == "web":
            VarGen.startfile("%s/index?lang=%s" % (self.web, self.configuracion.traductor))
        # elif resp == "downloads":
            # VarGen.startfile("https://2dc90e9d4d8c66f3ab71f42ff9cd1b6ab1f26543.googledrive.com/host/0B0D6J3YCrUoublFqc0VGZWw3VVU/release/")
        elif resp == "mail":
            VarGen.startfile("mailto:[email protected]")
コード例 #4
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)
コード例 #5
0
def envia(quien, dato):
    # log( "[%s] : [%s]"%( quien, dato ) )
    # log( "Enviado a " + str(VarGen.dgtDispatch) + "\n" )
    if VarGen.dgtDispatch:
        return VarGen.dgtDispatch(quien, dato)
    return 1
コード例 #6
0
    def informacion(self):

        liBlog = (
            ("Director ",
             "http://lucaschess.blogspot.com.es/2012/05/director.html"),
            ("Tactical training with your own blunders",
             "http://lucaschess.blogspot.com.es/2011/11/tactical-training-with-your-own.html"
             ),
            ("Announcements sounds",
             "http://lucaschess.blogspot.com.es/2011/10/announcements-sounds.html"
             ),
            ("Personalities in Game against an engine of your choice",
             "http://lucaschess.blogspot.com.es/2011/09/version-60-beta-1-personalities.html"
             ),
            ("Training favourites and Your daily test",
             "http://lucaschess.blogspot.com.es/2011/09/version-60-dev4-with-favourites-and.html"
             ),
            ("Captured material panel",
             "http://lucaschess.blogspot.com.es/2011/06/version-53-captures-and-more.html"
             ),
            ("Learn openings by repetition",
             "http://lucaschess.blogspot.com.es/2011/06/version-52-standard-openings.html"
             ),
            ("Kibitzers",
             "http://lucaschess.blogspot.com.es/2011/06/version-51-with-kibitzers.html"
             ),
            ("Training mate positions",
             "http://lucaschess.blogspot.com.es/2011/03/new-option-training-mate-positions.html"
             ),
        )

        menu = QTVarios.LCMenu(self.pantalla)

        menu.opcion("docs", _("Documents"), Iconos.Ayuda())
        menu.separador()
        menu.opcion("web", _("Homepage"), Iconos.Web())
        menu.separador()
        menu1 = menu.submenu("Fresh news", Iconos.Blog())
        menu1.opcion("blog", "Fresh news", Iconos.Blog())
        menu1.separador()
        for txt, lnk in liBlog:
            menu1.opcion(lnk, txt, Iconos.PuntoAzul())
        menu.separador()
        # menu.opcion("downloads", _("Downloads"), Iconos.Downloads())
        # menu.separador()
        menu.opcion("mail",
                    _("Contact") + " (%s)" % "*****@*****.**",
                    Iconos.Mail())
        menu.separador()

        menu.opcion("acercade", _("About"), Iconos.Aplicacion())

        resp = menu.lanza()
        if resp is None:
            return
        elif resp == "acercade":
            self.acercade()
        elif resp == "docs":
            VarGen.startfile("%s/docs" % self.web)
        elif resp == "blog":
            VarGen.startfile(self.blog)
        elif resp.startswith("http"):
            VarGen.startfile(resp)
        elif resp == "web":
            VarGen.startfile("%s/index?lang=%s" %
                             (self.web, self.configuracion.traductor))
        # elif resp == "downloads":
        # VarGen.startfile("https://2dc90e9d4d8c66f3ab71f42ff9cd1b6ab1f26543.googledrive.com/host/0B0D6J3YCrUoublFqc0VGZWw3VVU/release/")
        elif resp == "mail":
            VarGen.startfile("mailto:[email protected]")
コード例 #7
0
def envia(quien, dato):
    # log("[envia: %s] : %s [%s]"%(quien, dato, str(VarGen.dgtDispatch)))
    if VarGen.dgtDispatch:
        return VarGen.dgtDispatch(quien, dato)
    return 1
コード例 #8
0
ファイル: DGT.py プロジェクト: JERUKA9/lucaschess
def envia(quien, dato):
    # log( "[%s] : [%s]"%( quien, dato ) )
    # log( "Enviado a " + str(VarGen.dgtDispatch) + "\n" )
    if VarGen.dgtDispatch:
        return VarGen.dgtDispatch(quien, dato)
    return 1