commands.getoutput from a cgi? -- CANCEL

Harry George hgg9140 at cola2.ca.boeing.com
Fri Nov 8 10:34:13 EST 2002


My guy tried the pipe approach again and says it now works.  So no
action needed.  (He'd been at this for a week, with me giving ideas to
try.)  Sorry for wasted bandwidth.


Harry George <hgg9140 at cola2.ca.boeing.com> writes:

> We need to run a shell script and get results, all from inside a cgi.
> This works standalone (not in the web server).  It works with python
> (2.2) from a cgi running from apache on Linux.  It does not work in
> python (2.1) on iPlanet on AIX.
> 
> The shell command is of the form:
>   "echo %s | another_script" % mydata
> 
> In the simplest case we are using:
>   "echo hello | sort"
> 
> The error is:
>   ....commands.py", line 55, in getstatusoutput sts = pipe.close()
>   IOError: [Errno 10] No child process
>  
> We've also tried popen, setting the child_stdin to the data in the
> echo and then running the script.  Same error.
> 
> Anything obvious?
> 
> -- 
> harry.g.george at boeing.com
> 6-6M31 Knowledge Management
> Phone: (425) 294-8757

-- 
harry.g.george at boeing.com
6-6M31 Knowledge Management
Phone: (425) 294-8757



More information about the Python-list mailing list