954,546 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Can python programs be embedded into web pages?

Can python programs with GUIs (such as Tkinter) be embedded into web pages?

I have looked into CGI programming before, but despite a search, I have found no books relating how to do this with python. Is it possible? Can anyone recommend a good book?

If not, what would you recommend as the best language to go with? I just want something easy for making very simple moving graphical displays on a web page. (E.g., a reader holds down a button and smiley faces start to appear on the screen.) It needs to be able to record what's happening though ("person A pressed button B"), so Flash is out.

aot
Junior Poster in Training
83 posts since Feb 2007
Reputation Points: 10
Solved Threads: 1
 

I know that you can use javascript to call python functions/scripts. said functions can return data which you can use in your html Interface.

It would be easier and nicer to be able to use python without the user having to have it installed.

I'm not too sure off-hand how to go about doing it but i'm sure a quick google will help you.

LarZ
Newbie Poster
21 posts since Nov 2007
Reputation Points: 10
Solved Threads: 2
 

Yeah, I guess I've been avoiding that a bit since I've been hoping someone will know of a way to do it without resorting to learning Javascript... oh well, nothing like learning a new language, eh?

aot
Junior Poster in Training
83 posts since Feb 2007
Reputation Points: 10
Solved Threads: 1
 

Javascript can be nice, but it can also be a bit of a mystery.

all you need to know to get started is this line:
alert("hello");

this is the easiest way to debug your script...

There are hundreds of GREAT javascript tutorials out there... maybe there's one that shows how to make function calls to python :) , so you can skip having to 'learn' the language ;)

LarZ

LarZ
Newbie Poster
21 posts since Nov 2007
Reputation Points: 10
Solved Threads: 2
 

you can count user presses in flash using actionscript 3.0 wich is slightly different to 2.0

leegeorg07
Posting Pro in Training
428 posts since Jul 2008
Reputation Points: 35
Solved Threads: 32
 

If you mean "embedded into web pages" ala PHP or ASP, I could recommend Spyce ( http://www.spyce.sf.net ).

If you mean "embedded into web pages" ala Javascript or Flash, the answer is generally no.

But be aware that Silverlight, being .NET driven, is scriptable via IronPython, so it is a qualified yes.

Jon Pierce
Newbie Poster
11 posts since Jul 2004
Reputation Points: 10
Solved Threads: 1
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You