I'm trying to see how I can get a python script to run in the web browser. Does anyone know if this is possible or would I need to make a plugin?
I'm looking for something that would work like:
<embed type="application/x-python" src="myscript.py"></embed>
Thanks, Joe
Brython is both a Python compiler and an interpreter written in JavaScript. As a result, you can compile and run Python code in the browser. A good example of this feature is demonstrated by the online editor available on the Brython website. With the online editor, Python is running in the browser.
The new PyScript project lets you embed Python programs directly in HTML pages and execute them within the browser without any server-based requirements.
Python is a programming language, you can't run native code of a programming language. You can however, run programs written in python in the browser.
I don't think any mainstream browser supports this by default so you'd need to write a plugin.
There are people that have tried this before though. For example, Iron Python + Silverlight.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With