[mod_python] Advantages of running non web oriented script using mod_python

Leeron Shalev leeron at devunity.com
Thu Oct 16 11:15:50 EDT 2008

I'm currently working on something else, and just pondering the
python-to-php issue, so yes, please do get back to me later with the rest of
the details.
The thing is, I'm sure it will work - I'm just asking if anybody has a word
of wisdom on which of the approaches will work best.

On Thu, Oct 16, 2008 at 5:05 PM, Clodoaldo Pinto Neto <
clodoaldo.pinto.neto at gmail.com> wrote:

> 2008/10/16 Leeron Shalev <leeron at devunity.com>:
> > Hello list :)
> > I love python, and have some experience using mod_python.
> > The thing is I have a web site that is based heavily upon PHP.
> > I have a specific task (Involving file manipulation and some libraries
> that
> > are implemented better in python than in PHP) that I'm planing on using a
> > python script for.
> > At start I thought I'll use mod_python for it, but the integration with
> the
> > DB and PHP objects soon became to much of a pain in the ass.
> > So the the two main options I'm now considering are:
> > 1. Using PHP for everything else and calling the python script using
> PHP's
> > exec() function.
> > 2. Using PHP for everything else and calling the python script via apache
> > and mod_python. (using php fopen() or something).
> > As I said, the final python script is mainly for manipulating the
> filesystem
> > and not really a web oriented script -
> > Do you think I'll have any benefits from using method 2 (in terms of
> > performance and concurrency) ?
> > Any help, thoughts or advice will be much appreciated.
> I have an old php site in which the chunck of code that executes a
> certain task was a bit convoluted (as usual in php) and as i wanted to
> change it i wrote it in python and it works nice. It is called as a
> web service and returns some lists (as text not html) which are loaded
> into arrays in php. I don't remember how exactily i did it as i have
> no access to the server now. In some hours i can check it and return
> to you if you still haven't figured it out.
> Regards, Clodoaldo
> > Cheers,
> > Leeron
> > _______________________________________________
> > Mod_python mailing list
> > Mod_python at modpython.org
> > http://mailman.modpython.org/mailman/listinfo/mod_python
> >
> >
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20081016/ca9bf530/attachment.html

More information about the Mod_python mailing list