8

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

6
  • 1
    see stackoverflow.com/questions/1235629/… Commented Dec 12, 2009 at 20:28
  • that doesn't really answer my question. thanks for finding it though :) Commented Dec 12, 2009 at 20:46
  • Would you like to use it on an intranet or extranet application? That is, is it acceptable to require users to install the python environment locally? Commented Dec 12, 2009 at 20:57
  • nope. i'm trying to build a lightweight chat application that'll work just by loading up a html page :) Commented Dec 12, 2009 at 20:59
  • The closest alternatives to date are listed at wiki.python.org/moin/WebBrowserProgramming Commented Feb 1, 2013 at 19:08

4 Answers 4

4

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.

Sign up to request clarification or add additional context in comments.

2 Comments

I think using silverlight and python will be a little too much. I'm trying to make this lightweight. Thanks anyway :)
@JoeSimpson I second your opinion. JavaScript as ECMA is uniform, and good remix of predecessor languages, but somehow the blend just builds up "something's wrong" gut feeling that I keep failing to nail. And it keeps getting worse with every interaction with those predecessors. There's skulpt and brython but they use javascript as managed VM layer comparable to faster Silverlight one! Hows your plug-in extension faring?
3

There is also brython and PythonScript but this one is compiled. I forked PythonScript to create Pythonium. There is also pypyjs.

Comments

2

pyjamas might be of interest.

Comments

2

Thank you very much to everyone who contributed hugs to all

I've decided that i'll just make a netscape-based plugin for python (source code and all that stuff will be availble when i've done it for everyone)

Joe

2 Comments

@ChawatheVipul is there a new ticket for that bug at mozilla?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.