- dependency
Python 2.7
A Python to Javascript translator in Python. It converts a subset of Python to a subset of Javascript, making availabele enough Javascript in Python to do many things useful among which (at least I think) a full Python interpreter. **Right now pythonscript command is a compiler.
First:
sudo pip install pythonscripttranslator
Write some Python then:
pythonscript < app.py > app.py.js
Then copy pythonscript.js from github to your project added both files as scripts of your page and voilà!
- added data descriptors
- added metaclasses functions and
type
as a class contructor - args and kwargs in called are respectively list and dictionary instead of javascript objects
- improvements in jquery bindings
- add minimal support for exceptions
- better support for loops
- introduce a builtins.py file
- renamed the compiled python runtime file to pythonscript.js
- booleans
- minimal list/dict/str but not fully compatible with CPython
get_attribute
support now inhertance but still not as CPython- new special function
var(spam, egg)
that is translated tovar spam, egg;
- new
range
that is compatible with for loop - several fixes in the compilation
- sudo python
- lazy for loop implementation (only used in pythonjs now)
- while loops
- fixing some callbacks in jquery bindings with
adapt_arguments
- support of python(positional, arguments, key=word, args,*kwargs), it doesn't work in callbacks
- positional arguments
- inheritance with custom mro