Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #69614

Re: Unicode Chars in Windows Path

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.albasani.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed1a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.001
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'subject:Windows': 0.02; 'that?': 0.05; 'paths': 0.07; 'archiving': 0.09; 'arguments': 0.09; 'file)': 0.09; 'type,': 0.09; 'api': 0.11; 'cc:addr:python- list': 0.11; 'assume': 0.14; 'windows': 0.15; 'accepts': 0.16; 'backslashes': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'inspires': 0.16; 'it;': 0.16; 'reedy': 0.16; 'said.': 0.16; 'slash': 0.16; 'subject:Unicode': 0.16; 'trivially': 0.16; '(you': 0.16; 'wrote:': 0.18; 'split': 0.19; 'thu,': 0.19; 'written': 0.21; '>>>': 0.22; 'otherwise,': 0.22; 'cc:addr:python.org': 0.22; 'passes': 0.24; 'cc:2**0': 0.24; "i've": 0.25; 'source': 0.25; 'second': 0.26; 'certain': 0.27; 'header:In-Reply-To:1': 0.27; 'point': 0.28; 'chris': 0.29; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; "d'aprano": 0.31; 'names.': 0.31; 'steven': 0.31; 'file': 0.32; 'open': 0.33; 'fri,': 0.33; 'could': 0.34; 'display': 0.35; 'common': 0.35; 'one,': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'application': 0.37; 'pm,': 0.38; 'anything': 0.39; 'either': 0.39; 'even': 0.60; 'most': 0.60; 'tell': 0.60; 'today,': 0.61; 'skip:* 10': 0.61; 'simply': 0.61; 'first': 0.61; 'name': 0.63; 'skip:n 10': 0.64; 'zip': 0.64; 'forward': 0.65; 'surprise': 0.74; 'hardly': 0.84; 'opens': 0.91; 'to:none': 0.92
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=m21FZXxq3sAak7abeVTFXr3k60nYkcOZMJibeHZ+Izg=; b=p9hR/kKEMLIwoPQJzBRTTQlIBjmbYW8s+yMsDhaWQptOyrm2OVDfVBW6IDuhrSdxP2 jCm3R/B0T7nivTUYgsMcWHY8ovoE9jJ+396n+K131axi7O1Rpf5GUp6+a4TmrUXccdTx qj996FH/4gQ9tQspfGUExy6pKaD4pps0gpcbDXKQXY9YMq8e74T/Jl3JHw0jJ/pMg8gF jjZTNUxXk4k2a55bUfAwrwPbv+yDmK0APYznd7fPGeJNM46cSaM9WvKp331ryDzmRa91 6/F8crn0iBu5UtYO/eENkRy5bCbLiBeVRi9xrUXAei54k4xPQE7AlXv175/CSPABz/a1 eVBw==
MIME-Version 1.0
X-Received by 10.60.61.66 with SMTP id n2mr12192990oer.11.1396562769492; Thu, 03 Apr 2014 15:06:09 -0700 (PDT)
In-Reply-To <lhka0v$v9h$2@ger.gmane.org>
References <f3b4238a-6bf4-478e-9326-1ba239d5237f@googlegroups.com> <533cc967$0$2909$c3e8da3$76491128@news.astraweb.com> <CAPTjJmomm96K9b250=FPvk-c-Fn7PohgTnjxOyruoC8Xe_o_Ew@mail.gmail.com> <lhka0v$v9h$2@ger.gmane.org>
Date Fri, 4 Apr 2014 09:06:09 +1100
Subject Re: Unicode Chars in Windows Path
From Chris Angelico <rosuav@gmail.com>
Cc "python-list@python.org" <python-list@python.org>
Content-Type text/plain; charset=UTF-8
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.8859.1396562772.18130.python-list@python.org> (permalink)
Lines 42
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1396562772 news.xs4all.nl 2899 [2001:888:2000:d::a6]:48166
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:69614

Show key headers only | View raw


On Fri, Apr 4, 2014 at 5:41 AM, Terry Reedy <tjreedy@udel.edu> wrote:
> On 4/2/2014 11:10 PM, Chris Angelico wrote:
>>
>> On Thu, Apr 3, 2014 at 1:37 PM, Steven D'Aprano <steve@pearwood.info>
>> wrote:
>>>
>>> Windows accepts both forward and backslashes in file names.
>>
>>
>> Small clarification: The Windows *API* accepts both types of slash
>
>
> To me, that is what Steven said.

Yes, which is why I said "clarification" not "correction".

>> (you can open a file using forward slashes, for instance), but not all
>> Windows *applications* are aware of this (generally only
>> cross-platform ones take notice of this), and most Windows *users*
>> prefer backslashes.
>
>
> Do you have a source for that?

Hardly need one for the first point - it's proven by a single Windows
application that parses a path name by dividing it on backslashes.
Even if there isn't one today, I could simply write one, and prove my
own point trivially (albeit not usefully). Anything that simply passes
its arguments to an API (eg it just opens the file) won't need to take
notice of slash type, but otherwise, it's very *VERY* common for a
Windows program to assume that it can split paths manually.

The second point would be better sourced, yes, but all I can say is
that I've written programs that use and display slashes, and had
non-programmers express surprise at it; similarly when you see certain
programs that take one part of a path literally, and then build on it
with either type of slash, like zip and unzip - if you say "zip -r
C:\Foo\Bar", it'll tell you that it's archiving
C:\Foo\Bar/Quux/Asdf.txt and so on. Definitely inspires surprise in
non-programmers.

ChrisA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Unicode Chars in Windows Path Steve <sreisscruz@gmail.com> - 2014-04-02 16:27 -0700
  Re: Unicode Chars in Windows Path Steven D'Aprano <steve@pearwood.info> - 2014-04-03 02:37 +0000
    Re: Unicode Chars in Windows Path Chris Angelico <rosuav@gmail.com> - 2014-04-03 14:10 +1100
      Re: Unicode Chars in Windows Path Marko Rauhamaa <marko@pacujo.net> - 2014-04-03 12:00 +0300
        Re: Unicode Chars in Windows Path Peter Otten <__peter__@web.de> - 2014-04-03 15:09 +0200
        Re: Unicode Chars in Windows Path random832@fastmail.us - 2014-04-03 09:57 -0400
        Re: Unicode Chars in Windows Path Chris Angelico <rosuav@gmail.com> - 2014-04-04 01:17 +1100
        Re: Unicode Chars in Windows Path David <bouncingcats@gmail.com> - 2014-04-04 11:15 +1100
        Re: Unicode Chars in Windows Path Chris Angelico <rosuav@gmail.com> - 2014-04-04 12:16 +1100
        Re: Unicode Chars in Windows Path David <bouncingcats@gmail.com> - 2014-04-04 13:02 +1100
    Re: Unicode Chars in Windows Path Terry Reedy <tjreedy@udel.edu> - 2014-04-03 14:41 -0400
    Re: Unicode Chars in Windows Path Chris Angelico <rosuav@gmail.com> - 2014-04-04 09:06 +1100
    Re: Unicode Chars in Windows Path Lele Gaifax <lele@metapensiero.it> - 2014-04-04 09:07 +0200
  Re: Unicode Chars in Windows Path alister <alister.nospam.ware@ntlworld.com> - 2014-04-03 08:35 +0000

csiph-web