[Distutils] Re: Bug/patch question, WinNT, Borland C linker, spaces in paths
Rafal Dowgird
Rafal Dowgird <dowgird@bms.com.pl>
Tue Dec 3 06:51:02 2002
Thanks for the reply.
> Are you sure that it's worth adding quoting support for paths
> with embedded spaces to distutils is worth the effort ?
> I know that spaces in paths of executables and DLLs cause
> endless problems on Windows and most of these can easily be
> avoided by installing program files to a non-space-containing
> path location on the disk.
I am far from insisting that this patch should be applied. There are
some simpler options that could improve the situation:
- documenting it as a known bug with workaround
- making distutils print a warning upon encountering a space in an
argument
What do you think? Of course, ignoring this is also possible.
> Please no string methods until after we have released Python 2.3.
> String methods are not available in Python 1.5.2 which we still
> support.
Sorry. As I have said, I have little knowledge of Python/distutils.
Here is the patch without string methods:
Index: spawn.py
===================================================================
RCS file: /cvsroot/python/distutils/distutils/spawn.py,v
retrieving revision 1.16
diff -r1.16 spawn.py
62,63c62
< if string.find(args[i], ' ') != -1:
< args[i] = '"%s"' % args[i]
---
> args[i] = string.replace(args[i],' ','" "')
Regards,
Rafal Dowgird