简体   繁体   English

使用javascript制作python解释器

[英]making a python interpreter using javascript

I want to make a python interpreter by using Javascript. 我想使用Javascript制作python解释器。

Then you can input the python code and the Javascript in the webpage can interpret the code into javascript code and then run the code and return the result. 然后,您可以输入python代码,然后网页中的Javascript可以将代码解释为javascript代码,然后运行代码并返回结果。

Because I have not much experience in this area, so I want some advice from the senior. 因为我在这方面没有太多经验,所以我需要高级人士的一些建议。

Thanks very much ... 非常感谢 ...

You can use pypyjs, and the detailed procedure is also available. 您可以使用pypyjs,还可以使用详细过程。 https://github.com/pypyjs/pypyjs/releases/ https://github.com/pypyjs/pypyjs/releases/

嗯,对于初学者而言,解释器并不是一件真正的工作,您最好还是使用AJAX将代码发送到服务器端,然后在页面中显示结果。

There are many interpreters and source-to-source compilers that can convert Python source code into JavaScript. 有许多解释器和源到源编译器可以将Python源代码转换为JavaScript。 The Skulpt interpreter allows Python source code to run in a web browser on the client-side. Skulpt解释器允许Python源代码在客户端的Web浏览器中运行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM