python as a web glue ?
francois lepoutre
franck.lepoutre at caramail.com
Fri Mar 14 08:55:51 EST 2003
> thanks, so i'll try python...
Welcome onboard:)
> do you know of any already existing project
> using mod_python to friendly start on this subject ?
You could possibly try the publisher architecture within mod_python itself.
It's a a nice and clean way to deliver content. But be sure to read the
mod_python documentation at least twice. It's ok but a bit short.
> and are there any special tricks to use external programs for python page
> serving ? i mean : cgi get a request, then launches another "third part
non
> cgi program" waits for response and then serves page builded from this 3rd
> part output, i think there are non obvious troubles that i don't even
> imagine now...
Of course the timing may be a pb there. There are ways to
get your user to wait until the page is delivered... as long
as the timeframe remains acceptable!
In other cases may I imagine you need to organise some kinds
of pre-fetching and buffering for your third-party stuff.
That's where mod_python helps a lot as you will be able to
keep the stuff in data structures (dictionary, list ...) semi-persistently
loaded within apache-hosted python interpreters.
If should not be too much of a problem on a linux platform.
If you use a win32 platform, you may run into threading issues.
They can be solved.
Look at the explanation on the way to keep database handle
persistent within mod_python.
Trying alternatives in the python world is generally a question
of hours, sometimes days... rarely weeks.
Good luck to you
François
More information about the Python-list
mailing list