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)
def main(): """ PyKor main entry point. """ get_transpyler().start_main()
def start_application(): transpyler = get_transpyler() transpyler.start_qturtle()
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 ================================================================================