File names with slashes [was Re: error in os.chdir]
On Thursday 05 July 2018 11:57:18 Mikhail V wrote:
> 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,
> that's suspicious...
> 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.
ick is a very weak adjective.
For a change, why can't windows do it right? Oh wait, its windows so the
question is moot. Sigh, and just one of the reasons there are zero
windows machines on my premises.
Cheers, Gene Heskett
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>