How does this compare to Brython ( http://brython.info/ ), apart from missing the Python 3 support? Are there any custom bindings to the browser API?
We are working on python3 support and skulpt does have a python3 mode which emulates the biggest differences between py2 and py3. (like from __future__ import). But it doesn't understand any of the new syntax added by python3 yet.
But in Skulpt the strings don't quite work like any of the Python versions.
Python 2 has a combined str/bytes type and a separate Unicode string type:
>>> type("hello") is type(u"你好")
False
>>> len(u"你好")
2
>>> len("你好")
6
...whereas in Python 3 the str type is Unicode and the "bytes" type is a completely separate thing: >>> type("hello") is type(u"你好")
True
>>> len(u"你好")
2
>>> len("你好")
2
Skulpt actually seems to work more like Python 3, except that 1) there is no way at all to work with bytes (that I can find), e.g. no encode/decode methods, and it 2) requires the "u" prefix if literals contain non-ASCII characters, even though the type of the resulting string is the same as without the prefix: >>> type("hello") is type(u"你好")
True
>>> len(u"你好")
2
>>> len("你好")
SyntaxError: invalid string (possibly contains a unicode character) on line 1