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.

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.

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?

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

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.

This article has been dead for over six months. Start a new discussion instead.