[issue1235] CGIHTTPRequestHandler.run_cgi() does not run on Windows if sys.executable contains blanks
report at bugs.python.org
Wed Oct 21 17:24:54 CEST 2009
Stac <stac_agenais at yahoo.fr> added the comment:
I am new to Python issues tracker. I had the error described above. I
worked on it.
I was not able to solve the issue only using subprocess. The command has
to be correctly formated (with the double quotes).
I corrected the cmdline definition as described first and migrated from
popen2 and popen3 to subprocess. I don't think I have the rights to
commit any code so I send the modified file.
Don't hesitate to tell me if you want me do to more.
PS : For information, the attached file correct the following error :
localhost - - [21/Oct/2009 17:20:52] "POST /cgi/test.py HTTP/1.1" 200 -
localhost - - [21/Oct/2009 17:20:52] command:
C:\Produits\Python26\python.exe -u C:\Documents and
localhost - - [21/Oct/2009 17:20:53] C:\Produits\Python26\python.exe:
can't open file 'C:\Documents': [Errno 2] No such file or directory
Now you have :
localhost - - [21/Oct/2009 16:48:46] "POST /cgi/test.py HTTP/1.1" 200 -
localhost - - [21/Oct/2009 16:48:46] command:
C:\Produits\Python26\python.exe -u "C:\Documents and
localhost - - [21/Oct/2009 16:48:47] CGI script exited OK
versions: -Python 3.0
Added file: http://bugs.python.org/file15175/MyCGIHTTPServer.py
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list