running programs from within python through CGI

Terry Reedy tjreedy at udel.edu
Sat Oct 19 14:33:41 EDT 2002


"revyakin" <revyakin at yahoo.com> wrote in message
news:fa06e058.0210190931.17eb8bf5 at posting.google.com...
> import os,sys
> sys.path.append('path to blast')

I believe sys.path is Python's private path for finding modules, and
has nothing to do with the path used by command interpreters.

> os.system('blast -args')

So maybe you should try os.system('path/to/blast -args')

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

Presumably because blast is not on sh path when sh is invoked from cgi
context.

Terry J. Reedy





More information about the Python-list mailing list