从浏览器运行Python应用程序 [英] Run Python application from browser
问题描述
就是说,是否可以从浏览器运行python?我想象一下我的教授或任何人可以点击的一些HTML文件启动浏览器,他们可以从那里玩我的游戏。
从我对这个主题的研究中,我学到了一些叫做Django的东西。但是,我不知道它是什么,也不知道如何实现它。再次,我对编程很新,所以如果你可以像我五点解释,那将是很棒的。
编辑:我发现这个其他的线程OP提出类似的问题,但我并不完全明白批准的答案:
嗯,不是真的。您的基本浏览器通常支持1种编程语言,javascript。
但是,您可以使用 pythonanywhere,这是一个托管的Python环境。
您还可以尝试 skulpt ,这是python的javacript实现,我从来没有尝试过这个。
I'm pretty new to programming and I've been learning python in my spare time. As a challenge to myself, I created a simple text adventure for a class project. This is not for a programming class, so the professor won't know how to compile a raw Python script, let alone have a Python interpreter on their Mac.
That being said, is it possible to run python from a browser? I'm imagining some HTML file that my professor, or anyone, can click that launches a browser and they can play my game from there.
I've learned about something called Django from my research on this subject. However, I have no idea what it is, nor how to implement it. Again, I'm pretty new to programming, so if you could "explain like I'm five", that would be great.
EDIT: I found this other thread where the OP asks a similar question, but I don't fully understand the approved answer:
execution python application from browser
Well, not really. Your basic browser generally supports 1 programming language, javascript.
However, you could use pythonanywhere" which is a hosted python environment.
You could also try skulpt which is a javacript implementation of python. I have never tried this myself.
这篇关于从浏览器运行Python应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!