running programs from within python through CGI

revyakin revyakin at yahoo.com
Sat Oct 19 13:31:28 EDT 2002


Hi all,
I am trying to run an external application from a python script. The
program is called blast which does not really matter, but I named it
here for certainty.

It works just fine from the shell:

import os,sys
sys.path.append('path to blast')
os.system('blast -args')

...nice stdout


However, when I try to run that script from CGI it does not work, I
get the following error:

sh: blast: command not found

I get the same error when I, say, try to run python scripts from php,
so it seems like I can't run any program from within another. The
server is a DARWIN.
 I know this issue may not have to do with python at all, but the
community in this newsgroup is so much nicer than in UNIX, so I
figured I may find help here...



More information about the Python-list mailing list