cgi integration question 2

Jeff Epler jepler at unpythonic.net
Sun Oct 20 18:24:59 CEST 2002


On Mon, Oct 21, 2002 at 02:20:08AM +1000, Ken wrote:
> I find it very strange that when I compile using python scriptfile.cgi in
> telnet environment, it works fine, but when I put on the web browser, the
> list is empty. Do you know how I can fix this problem?

>>> os.popen2("not a valid command")[1].read()
/bin/sh: not: command not found
''

PATH is not set like you expect under CGI (it probably has some default
value, like /bin:/usr/bin).  This is not a Python-specific problem...

Jeff




More information about the Python-list mailing list