The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Programming Languages
> Python Programming
|
XHTML and Python
Discuss XHTML and Python in the Python Programming forum on Dev Shed. XHTML and Python Python Programming forum discussing coding techniques, tips and tricks, and Zope related information. Python was designed from the ground up to be a completely object-oriented programming language.
|
|
 |
|
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

October 2nd, 2003, 05:35 PM
|
|
Contributing User
|
|
Join Date: Feb 2003
Location: Canada
|
|
|
XHTML and Python
Do you know of any tutorials that teach you about making an XHTML page and importing Python scripts?
Example: Getting date and time.
|

October 2nd, 2003, 06:09 PM
|
 |
Hello World :)
|
|
Join Date: Mar 2003
Location: Hull, UK
|
|
Sorry i'm lost, can you examplain what you mean  ..
Mark.
__________________
programming language development: www.netytan.com – Hula
|

October 2nd, 2003, 07:42 PM
|
|
Contributing User
|
|
Join Date: Feb 2003
Location: Canada
|
|
|
This is so hard to explain.
Say you are making an XHTML/XML page. (Saved as .htm) In the script of the page, you import Python scripts to do certain things like get the date and time.
|

October 2nd, 2003, 08:32 PM
|
|
Contributing User
|
|
Join Date: Dec 2001
Location: Houston, TX
Posts: 383
Time spent in forums: 1 h 41 m 27 sec
Reputation Power: 12
|
|
|

October 2nd, 2003, 09:18 PM
|
 |
Hello World :)
|
|
Join Date: Mar 2003
Location: Hull, UK
|
|
|
You mean you want to call a CGI program from within a html page? If so i've seen perl counters called in this way but i don't know how exactly..
Mark
|

October 2nd, 2003, 09:29 PM
|
|
Contributing User
|
|
Join Date: Feb 2003
Location: Canada
|
|
|
I think I want to call a CGI program. I just know someone made a page in XHTML/XML and they imported Python scripts.
|

October 2nd, 2003, 10:05 PM
|
|
Contributing User
|
|
Join Date: Dec 2001
Location: Houston, TX
Posts: 383
Time spent in forums: 1 h 41 m 27 sec
Reputation Power: 12
|
|
|
*cough* read the above paper
|

October 3rd, 2003, 09:05 AM
|
 |
Hello World :)
|
|
Join Date: Mar 2003
Location: Hull, UK
|
|
I've read the paper strike (read it last night  ), was very interstig. But it didn't say anything about calling a python program from inside plain html which is what were talking about here?
Mark.
|

October 3rd, 2003, 09:50 AM
|
|
Hi, I'm Calvin
|
|
Join Date: Sep 2003
Location: LosAngeles, SanDiego, Houston
Posts: 50
Time spent in forums: 7 m 7 sec
Reputation Power: 10
|
|
hmmm...
do you mean something like invoking python code inside of html, like jsp style?
you might give spyce or psp a try or something... and yeah, read the linked paper 
|

October 3rd, 2003, 10:52 AM
|
 |
Hello World :)
|
|
Join Date: Mar 2003
Location: Hull, UK
|
|
I'm definatly a Spyce kinda guy when it comes to embedding Python in html. PSP just doesn't sit well with me for some reason. Maybe it's the whole Java thing
Anyway there does seems to be some comfusion about what exactly we're talking about here  .. maybe you could give us some more info?
Edit: I would read the article Strike pointed to if you havn't already, if only out of interest.
Mark.
Last edited by netytan : October 3rd, 2003 at 10:54 AM.
|

October 3rd, 2003, 04:25 PM
|
|
Contributing User
|
|
Join Date: Feb 2003
Location: Canada
|
|
|
I read the paper. It was a very good read but didn't explain what I wanted. I think you guys are on the right track of what I was wanting to do.
So should I get Spyce?
* What is Rpy?
|

October 3rd, 2003, 04:31 PM
|
|
Hi, I'm Calvin
|
|
Join Date: Sep 2003
Location: LosAngeles, SanDiego, Houston
Posts: 50
Time spent in forums: 7 m 7 sec
Reputation Power: 10
|
|
RPy: it's an interface between python and "R-Programming Language"... which, i think, is a statistical programming language. i don't know much more than that, i just googled it.
as far as spyce goes... Mark seems to really like it. i think it's pretty powerful (seems like it) but i don't know what it's like to actually use it (speed, flexibility, etc).
you can find it at http://spyce.sourceforge.net/
|

October 3rd, 2003, 04:46 PM
|
|
Contributing User
|
|
Join Date: Feb 2003
Location: Canada
|
|
|
Is it possible to embed Python into XHTML without having to download anything?
|

October 3rd, 2003, 07:15 PM
|
 |
Hello World :)
|
|
Join Date: Mar 2003
Location: Hull, UK
|
|
Well i've chatted to the guy who made Spyce a few times which kinda helps  and i'd It's fast enough, i wouldn't say that it's speedy.. well unless of course you run it with mod_python or fastcgi then
So if you're looking for speed then Spyce probably isn't for you, but if your looking for power, some sweet features and truly Pythonic way to work on the web then i think you'll be surprised.
If your on windows then you can probably get ASP to handle embedding Python for you, other than that you could write you're own?
Mark.
|

October 3rd, 2003, 09:51 PM
|
|
Contributing User
|
|
Join Date: Feb 2003
Location: Canada
|
|
Is there any program that has speed AND power? Both are very important to me.
If you have a program like Spyce, do you have to use a certain extension? Such as ".spy" Is there a program where you can just save it as ".htm" or ".html"?
You can't have ASP on Windows XP: Home Edition. I'm saving up to build a computer. I'm going to have Debian as my operating system. (Best OS ever!  )
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|