This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: CGIHttpServer fails if python exe has spaces
Type: Stage:
Components: Extension Modules Versions: Python 2.5
process
Status: closed Resolution: duplicate
Dependencies: Superseder:
Assigned To: Nosy List: collinwinter, loewis, stevecassidy
Priority: normal Keywords:

Created on 2007-05-03 00:34 by stevecassidy, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (5)
msg31933 - (view) Author: Steve Cassidy (stevecassidy) Date: 2007-05-03 00:34
In addition to the problem noted in #1436206 with spaces in the file names of scripts being executed, if Python has been installed in a directory with spaces (C:\Program Files\Python) the server will fail to execute the script because the name of the executable is not quoted properly.

My attempts to fix this have failed since just putting quotes around the exe name "C:\\Program Files\..." doesn't work, however we have found that just quoting the part of the path with spaces 'C:\\"Program Files"\\...' will work.  

It seems a bit odd that this bug has persisted for so long. A fix would be nice since this module is really good to give to my students (doing python web development for the first time) so they don't have to worry about server installation issues. 

Steve

msg31934 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2007-05-08 19:11
I don't find it odd that the bug persisted for so long: there is a reason that the default installation of Python does *not* go into "Program Files", as spaces in file names produce endless problems.

Quoting the paths should work, though - don't forget to quote arguments as well.
msg31935 - (view) Author: Collin Winter (collinwinter) * (Python committer) Date: 2007-06-05 17:56
This issue is a duplicate of #1436206. Closing.
msg31936 - (view) Author: Steve Cassidy (stevecassidy) Date: 2007-06-05 23:28
I understand that the default install location is non-standard becuase Python has trouble at times with spaces in filenames. However, if this is an engineering decision is there a trace of the bugs that are avoided because of it? The user isn't warned on installation not to choose a location with spaces to avoid problems x y and z.  A regular windows user will find it odd that Python wants to be installed in C:\Python and I would imagine that in many managed environments this won't be possible.   

So the response to this bug shouldn't be just to close it, maybe it needs a patch to warn people of the issue when installing python at the least. In the longer term though it seems really odd that Python can't solve this relatively simple problem that other envionments have no trouble with.

Steve
msg31937 - (view) Author: Collin Winter (collinwinter) * (Python committer) Date: 2007-06-05 23:37
I did not close this bug because it's unimportant; I closed it because it's already on file (#1436206), and there's no sense in having multiple tracker entries for the same issue. That said, problems on Windows are less likely to get fixed or noticed because relatively few core developers have access to Windows platforms. We would greatly appreciate a patch that fixes this.
History
Date User Action Args
2022-04-11 14:56:24adminsetgithub: 44923
2007-05-03 00:34:08stevecassidycreate