I have some existing Python code that I would like to run in the browser, without having to rewrite it in JavaScript. Has anyone used any of the tools that allow the use of Python in the browser?
There seem to be two classes of such tools:
1. Python interpreters written in JavaScript. These include Brython [1], Skulpt [2] and Batavia [3].
2. Compilers (a.k.a. transpilers) that convert Python code directly into JavaScript. I would expect this to provide better performance than an interpreter, but perhaps be a less accurate Python implementation. This seems to be the approach taken by Transcrypt [4].
Has anyone used any of the above, or similar tools? How did you find them in terms of compatibility, performance etc?
[1] https://brython.info/
[2] https://skulpt.org/
[3] https://github.com/beeware/batavia
[4] https://www.transcrypt.org/