Can python programs be embedded into web pages?

Reply

Join Date: Feb 2007
Posts: 77
Reputation: aot is an unknown quantity at this point 
Solved Threads: 1
aot's Avatar
aot aot is offline Offline
Junior Poster in Training

Can python programs be embedded into web pages?

 
0
  #1
Nov 29th, 2007
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.
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 21
Reputation: LarZ is an unknown quantity at this point 
Solved Threads: 2
LarZ LarZ is offline Offline
Newbie Poster

Re: Can python programs be embedded into web pages?

 
0
  #2
Nov 30th, 2007
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.
if this were a computer game i'd be googling a patch right now...
Reply With Quote Quick reply to this message  
Join Date: Feb 2007
Posts: 77
Reputation: aot is an unknown quantity at this point 
Solved Threads: 1
aot's Avatar
aot aot is offline Offline
Junior Poster in Training

Re: Can python programs be embedded into web pages?

 
0
  #3
Nov 30th, 2007
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?
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 21
Reputation: LarZ is an unknown quantity at this point 
Solved Threads: 2
LarZ LarZ is offline Offline
Newbie Poster

Re: Can python programs be embedded into web pages?

 
0
  #4
Nov 30th, 2007
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 this were a computer game i'd be googling a patch right now...
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 395
Reputation: leegeorg07 is an unknown quantity at this point 
Solved Threads: 31
leegeorg07's Avatar
leegeorg07 leegeorg07 is offline Offline
Posting Whiz

Re: Can python programs be embedded into web pages?

 
0
  #5
Jul 6th, 2008
you can count user presses in flash using actionscript 3.0 wich is slightly different to 2.0
Reply With Quote Quick reply to this message  
Join Date: Jul 2004
Posts: 11
Reputation: Jon Pierce is an unknown quantity at this point 
Solved Threads: 1
Jon Pierce Jon Pierce is offline Offline
Newbie Poster

Re: Can python programs be embedded into web pages?

 
0
  #6
Jul 7th, 2008
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.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the Python Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC