Ejemplo n.º 1
0
def start_console(*, namespace=None, transpyler=None):
    """
    Runs the main console.
    """

    transpyler = transpyler or get_transpyler()
    console = TranspylerConsole(namespace, transpyler=transpyler)
    banner = transpyler.console_banner()
    console.interact(banner)
Ejemplo n.º 2
0
def main():
    """
    PyKor main entry point.
    """
    get_transpyler().start_main()
Ejemplo n.º 3
0
def start_application():
    transpyler = get_transpyler()
    transpyler.start_qturtle()
Ejemplo n.º 4
0
import pytest

from pytuga import transpile
from transpyler import get_transpyler

tokenize = get_transpyler().lexer.tokenize


def pytg(src):
    return [repr(x) for x in tokenize(transpile(src))]


def py(src):
    return [repr(x) for x in tokenize(src)]


#
# Dictionary of translations. Each test case is separated by a line of ='s and
# where the 1st part has a Pytugues code and the second part has the
# corresponding python source
#
data = r'''
================================================================================

--------------------------------------------------------------------------------

================================================================================
verdadeiro, falso, nulo, Verdadeiro, Falso, Nulo
--------------------------------------------------------------------------------
True, False, None, True, False, None
================================================================================