But how do I create the lua modules that implement sprintf and jsdict?
I can see __sprintf can be found in runtime/lua_builtins.py
Should I translate this to lua? I tried but translation failed:
$ ./translator.py --lua runtime/lua_builtins.py
Traceback (most recent call last):
File "./translator.py", line 138, in <module>
command()
File "./translator.py", line 130, in command
js = main(data, module_path=mpath)
File "./translator.py", line 50, in main
a = python_to_pythonjs(script, lua=True, module_path=module_path)
File "/mnt/oldharddisk/takeshi_extra/src/git/PythonJS/pythonjs/python_to_pythonjs.py", line 4057, in main
module_path = module_path
File "/mnt/oldharddisk/takeshi_extra/src/git/PythonJS/pythonjs/python_to_pythonjs.py", line 192, in __init__
source = typedpython.transform_source( source )
File "/mnt/oldharddisk/takeshi_extra/src/git/PythonJS/pythonjs/typedpython.py", line 65, in transform_source
assert ''.join(a[-3:])=='map'
AssertionError
I am experimenting translating a small python fragment to lua doing this:
But how do I create the lua modules that implement sprintf and jsdict? I can see __sprintf can be found in runtime/lua_builtins.py Should I translate this to lua? I tried but translation failed:
What about __jsdict?