[Tutor] how to run php scripts in pylons framework?
vinces1979 at gmail.com
Fri Oct 2 16:32:17 CEST 2009
On Fri, Oct 2, 2009 at 1:24 AM, goooogi goooogi <gopcos at gmail.com> wrote:
> Dear All,
> I have some php scripts which I don't want to rewrite in python. How can I
> run php Scripts in python?
> Thanks in advance
> Googi G
> Tutor maillist - Tutor at python.org
> To unsubscribe or change subscription options:
Although rewriting is a better option, you can use the subprocess module to
make system calls to the php interpreter
#simple caller, disguard output
# if you want output
proc = subprocess.Popen("php /path/to/my/script.php", shell=True,
script_response = proc.stdout.read()
Hope that helps,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tutor