Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Embedding a Python shell in a webpage [closed]

I am working on a manuscript for introducing programming to beginners. Python is one of the two languages I cover in this book. I would like to setup up a webpage with an embedded Python shell for my readers to go and try things out. What would be the best way to go about it? I am aware of web apps like repl.it. I would personally like to set something up myself, however.


1 Answers

There is a sample google appengine project that provides Python shell e.g., http://live.sympy.org uses it.

Or your JavaScript code (an Ajax shell) could communicate with a sandboxed Pypy version using something like this Twisted WebSocket server.

like image 130
jfs Avatar answered Jul 01 '26 12:07

jfs