append to non-existing list

Yves Glodt y.glodt at sitasoftware.lu
Thu Nov 10 05:12:15 EST 2005


bonono at gmail.com wrote:
> Yves Glodt wrote:
>> Which raises another question... :-)
>>
>> Is there a possibility to bring together apache and python in a way that
>> I can embed python into html?
> What do you mean ?

I need this (invalid example-html follows):

<html>
<h1>title of page</h1>

<?py

import time

print "<p>Hello, today is: %s</p>" % (time.ctime())

?>

</html>


Should that not be fairly easy to to, even from scratch, with the 
httplib module...?

The advantage would be that I could write a webinterface for my database 
and reuse the classes I wrote for the command line app.

>> Or even, write a smallish webserver in python (using twisted maybe)
>> whose only purpose is to serve pages and execute the embedded code...?
> My favorite is TurboGears, a collection of modules and glue that brings
> together HTTP server(cherrypy), template(Kid) and SQL object
> store(SQLObject) that can do serious web developement yet don't need to
> read a book before starting.
> 
> If you just need the server, cherrypy is pretty good and simple to
> start.

Ok gonna look into that,

regards,
Yves



More information about the Python-list mailing list