我正在写一篇向初学者介绍编程的手稿。 Python 是我在本书中介绍的两种语言之一。我想建立一个带有嵌入式 Python shell 的网页,供我的读者去尝试。最好的方法是什么?我知道像 repl.it 这样的网络应用程序。不过,我个人想自己设置一些东西。
最佳答案
有一个sample google appengine project提供 Python shell,例如 http://live.sympy.org使用它。
或者您的 JavaScript 代码(Ajax shell)可以与 sandboxed Pypy version 进行通信使用类似this Twisted WebSocket server的东西.
关于python - 在网页中嵌入 Python shell,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11813301/