Why exception from os.path.exists()?

Chris Angelico rosuav at gmail.com
Sun Jun 10 20:03:48 EDT 2018


On Mon, Jun 11, 2018 at 9:52 AM, Steven D'Aprano
<steve+comp.lang.python at pearwood.info> wrote:
> On Mon, 11 Jun 2018 06:10:26 +1000, Chris Angelico wrote:
>
>> Can you try creating "spam:ham" and "spam/ham"? If they're both legal,
>> I'd like to see what their file names are represented as.
>
> The Finder could very easily be substituting another character, like
> Konqueror (the KDE 3 file manager) does. In Konqueror, you can create a
> file named "spam/ham" and it quietly substitutes "spam%2fham" instead.
> But Konqueror's GUI treats it completely transparently: it is displayed
> as a slash, and if you copy the file name from the GUI you get a slash.

Speculation is all very well, but I was wanting to see what actually
happened. :)

ChrisA



More information about the Python-list mailing list