File names with slashes [was Re: error in os.chdir]
mikhailwas at gmail.com
Thu Jul 5 11:57:18 EDT 2018
Steven D'Aprano wrote:
> In Explorer and the open-file dialog of most applications, they will see
> paths like this:
> directory\file name with spaces
> with the extension (.jpg, .pdf, .docx etc) suppressed. So by your
> argument, Python needs to accept strings without quotes:
> open(directory\file name with spaces, 'r')
> and guess which extension you mean.
> That would be fun to watch in action.
I think it's what is called 'English humor'?
Funny (just a little bit).
Wait a moment - you are well aware of Windows features,
BTW Explorer with hidden extension that's a sign of
"double-click, drag-and-drop" category of users.
Definitely more advanced users turn on extensions,
or don't even use explorer as a file manager.
> Linux programmers will
> see paths with spaces and other metacharacters escaped:
> directory/file\ name\ with\ spaces.txt
ick. what I see is escaping of the most frequent Latin character.
More information about the Python-list