Command line arguments??
nobody at nowhere.com
Wed Nov 18 19:19:27 CET 2009
On Tue, 17 Nov 2009 23:57:55 +0000, Rhodri James wrote:
>>> Quote the filenames or escape the spaces:
>>> C:\Python26\Python.exe C:\echo.py "C:\New Folder\text.txt"
>>> We've been living with this pain ever since windowed GUIs encouraged
>>> to put spaces in their file names (Apple, I'm looking at you!).
>>> Fundamentally, if people want the pretty they have to live with the
>> We've been living with much worse ever since Unix allowed users to put
>> not only spaces but even newlines in their filenames.
> You'll notice I said "encouraged", not "allowed".
You'll notice I said "allowed", not "encouraged".
Code which can't handle spaces in filenames is broken from the outset; it
doesn't suddenly break the first time that someone passes a filename
I have a suspicion that Win95 put spaces in two of the most important
directory names specifically to force developers to deal with this.
Nowadays, any Windows program which cannot handle spaces in pathnames is
usually a port of a Unix program (and a shoddy one at that).
OTOH, I'm surprised at how much Windows software still cannot handle
filenames outside of the system codepage (i.e. it's using the
byte-oriented API rather than the Unicode API).
More information about the Python-list