PYGJS - 1.0
Use the Python and the PyGame library in your browser/nodewebkit!
Asher Wolfstein
(asherwolfstein)
It requires a bit of reprogramming on the side of the PyGame application to take advantage of the modified event loop and such. And not every piece of PyGame is supported (up to about 1.7-1.8) but it works. It uses Brython (http://brython.info/) to execute Python in the browser, and then using that Python you can import PyGame and use it. PyGame modules map to various Javascript libraries handling graphics, sound, and user input.
Changes
It requires a bit of reprogramming on the side of the PyGame application to take advantage of the modified event loop and such. And not every piece of PyGame is supported (up to about 1.7-1.8) but it works. It uses Brython (http://brython.info/) to execute Python in the browser, and then using that Python you can import PyGame and use it. PyGame modules map to various Javascript libraries handling graphics, sound, and user input.
Links
Releases
Pygame.org account Comments
-
jmm0 2017-10-26 23:07
How would I get the demo running? I tried downloading the repo (https://github.com/asherwunk/pygjs/archive/master.zip), extracting it, starting a web server in the directory where I'd extracted the repo (python -c "__import__('SocketServer').TCPServer(('localhost', 80), __import__('SimpleHTTPServer').SimpleHTTPRequestHandler).serve_forever()"), and opening http://localhost in a modern browser; the page doesn't load successfully. Do I need to use a sophisticated web server? Are there dependencies I must install? Is pygjs OS-agnostic?