passing data from PHP to python

Andrey Revyakin revyakag at umdnj.edu
Mon Aug 13 14:42:54 EDT 2001


Yep, I eventually figured it out! Thanks!

Andrey.

Kalle Svensson wrote:

> [Andrey Revyakin]
> > I would like to exe a python module from php.
> > In the simpliest case, I have a "test.py" file like this:
> >
> > #!/usr/local/bin/python
> > print "test"
> >
> > and I call it from php like this
> >
> > system("python test.py");
> >
> > Works fine. Now, what if I need to pass an argument from php to the
> > "test.py" module? How do I do that?
>
> system("python test.py arg");
> might work.
>
> Peace,
>   Kalle
> --
> [  kalle at gnupung.net  ][ Thought control, brought to you by the WIPO! ]
> [ http://gnupung.net/ ][ http://anti-dmca.org/ http://eurorights.org/ ]




More information about the Python-list mailing list