简体   繁体   中英

making a python interpreter using javascript

I want to make a python interpreter by using Javascript.

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.

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. https://github.com/pypyjs/pypyjs/releases/

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

There are many interpreters and source-to-source compilers that can convert Python source code into JavaScript. The Skulpt interpreter allows Python source code to run in a web browser on the client-side.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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