By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,386 Members | 1,715 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,386 IT Pros & Developers. It's quick & easy.

Calling python scripts from php

P: n/a
Hi all,

I'm currently working on a project to develop an online simulation model of
the juvenile justice system in Queensland. We've developed the simulation
model using the python module simPy and currently we're trying to link the
simulation model to a web interface. Unfortunately, the web interface and
its interactions with the database have been separately developed in PHP and
ASP. Rather than rebuilding the web interface using python, we're looking
for an easy way to call a python script from within PHP. In particular,
we'd like to have the script called but, as running the model can take some
time, we'd prefer if the browser didn't have to sit and wait while the
script was running (instead, we intend to notify the user via email when
their model has completed). So all we really want to do is start the script
off and running (it's a simple call to a python method).

If you're particularly interested in helping me out and if I've not been
entirely clear, you can go to:

http://210.49.85.147:8000/justicemodel/login.php

and log in using the user name: temp and the password: pass, select a model
and go to the workspace - the button 'run model' is what we want to trigger
the python script, while all the rest of the website (setting up the model
scenarios, viewing output etc etc) has been developed in php and asp. Any
assistance anyone can offer me would be greatly appreciated.

Thanks a lot,
Michael
Jul 18 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
In article <42**********************@news.optusnet.com.au>,
Michael Livingston <mi*************@hotmail.com> wrote:
Hi all,

I'm currently working on a project to develop an online simulation model of
the juvenile justice system in Queensland. We've developed the simulation
model using the python module simPy and currently we're trying to link the
simulation model to a web interface. Unfortunately, the web interface and
its interactions with the database have been separately developed in PHP and
ASP. Rather than rebuilding the web interface using python, we're looking
for an easy way to call a python script from within PHP. In particular,
we'd like to have the script called but, as running the model can take some
time, we'd prefer if the browser didn't have to sit and wait while the
script was running (instead, we intend to notify the user via email when
their model has completed). So all we really want to do is start the script
off and running (it's a simple call to a python method).

If you're particularly interested in helping me out and if I've not been
entirely clear, you can go to:

http://210.49.85.147:8000/justicemodel/login.php

and log in using the user name: temp and the password: pass, select a model
and go to the workspace - the button 'run model' is what we want to trigger
the python script, while all the rest of the website (setting up the model
scenarios, viewing output etc etc) has been developed in php and asp. Any
assistance anyone can offer me would be greatly appreciated.

Jul 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.