コード例 #1
0
ファイル: console.py プロジェクト: vitornere/transpyler
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)
コード例 #2
0
ファイル: __main__.py プロジェクト: Transpyler/pykor
def main():
    """
    PyKor main entry point.
    """
    get_transpyler().start_main()
コード例 #3
0
ファイル: __main__.py プロジェクト: vitornere/qturtle
def start_application():
    transpyler = get_transpyler()
    transpyler.start_qturtle()
コード例 #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
================================================================================