Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #91017
| Path | csiph.com!usenet.pasdenom.info!news.redatomik.org!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <python@mrabarnett.plus.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.007 |
| X-Spam-Evidence | '*H*': 0.99; '*S*': 0.00; 'apis': 0.07; 'subject:file': 0.07; '22,': 0.09; 'python': 0.11; 'python.': 0.11; "'/'": 0.16; 'backslashes': 0.16; 'from:addr:mrabarnett.plus.com': 0.16; 'from:addr:python': 0.16; 'from:name:mrab': 0.16; 'message-id:@mrabarnett.plus.com': 0.16; 'options),': 0.16; 'received:192.168.1.4': 0.16; 'received:84.93': 0.16; 'received:84.93.230': 0.16; 'slashes': 0.16; 'subject: \n ': 0.16; 'subject:folder': 0.16; 'subject:sub': 0.16; 'yup,': 0.16; 'wrote:': 0.16; '>>>': 0.20; 'windows': 0.20; '(or': 0.21; 'am,': 0.23; '2015': 0.23; 'needed.': 0.23; "i've": 0.24; 'import': 0.24; 'header:In-Reply-To:1': 0.24; 'unix': 0.24; 'feature': 0.24; 'wondering': 0.25; 'header:User-Agent:1': 0.26; 'chris': 0.26; 'dos': 0.27; 'command': 0.28; 'this.': 0.28; 'subject:/': 0.29; 'command-line': 0.29; 'dialog': 0.29; 'them?': 0.29; 'character': 0.29; 'convert': 0.29; '(which': 0.29; 'fri,': 0.31; 'received:84': 0.32; "d'aprano": 0.33; 'steven': 0.33; 'surprised': 0.33; 'file': 0.34; 'could': 0.35; 'to:addr:python- list': 0.35; "isn't": 0.35; '(and': 0.36; 'heard': 0.36; 'quite': 0.37; 'subject:: ': 0.37; 'ok,': 0.37; "won't": 0.38; 'wanted': 0.39; 'whatever': 0.39; 'to:addr:python.org': 0.39; 'system.': 0.39; 'received:192': 0.39; 'subject:-': 0.39; 'where': 0.40; 'some': 0.40; 'back': 0.61; 'even': 0.61; 'day,': 0.62; 'forward': 0.65; 'due': 0.65; 'special': 0.72; 'introduce': 0.78; '2.7.': 0.84; 'actually,': 0.84; 'me).': 0.84; 'that)': 0.84; 'boxes,': 0.91; 'edwards': 0.91 |
| X-CM-Score | 0.00 |
| X-CNFS-Analysis | v=2.1 cv=dZcO3Bne c=1 sm=1 tr=0 a=0nF1XD0wxitMEM03M9B4ZQ==:117 a=0nF1XD0wxitMEM03M9B4ZQ==:17 a=0Bzu9jTXAAAA:8 a=QrohdLjRRo4A:10 a=IkcTkHD0fZMA:10 a=EBOSESyhAAAA:8 a=pGLkceISAAAA:8 a=kZ7UWmmPAAAA:8 a=u96MFOJ_ei8qps1ftjMA:9 a=QEXdDO2ut3YA:10 |
| X-AUTH | mrabarnett@:2500 |
| Date | Thu, 21 May 2015 17:54:01 +0100 |
| From | MRAB <python@mrabarnett.plus.com> |
| User-Agent | Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 |
| MIME-Version | 1.0 |
| To | python-list@python.org |
| Subject | Re: Find if a file existing within 1000s of folder/sub-folder - each file has a unique presence |
| References | <9d786d0b-0f25-4446-a730-ff1fe2f6b20d@googlegroups.com> <555d9233$0$12913$c3e8da3$5496439d@news.astraweb.com> <mjkp7j$p7k$1@reader1.panix.com> <mailman.200.1432218440.17265.python-list@python.org> <mjl19n$etm$1@reader1.panix.com> |
| In-Reply-To | <mjl19n$etm$1@reader1.panix.com> |
| Content-Type | text/plain; charset=utf-8; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.20+ |
| 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.205.1432227244.17265.python-list@python.org> (permalink) |
| Lines | 40 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1432227244 news.xs4all.nl 2827 [2001:888:2000:d::a6]:54319 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:91017 |
Show key headers only | View raw
On 2015-05-21 17:31, Grant Edwards wrote:
> On 2015-05-21, Chris Angelico <rosuav@gmail.com> wrote:
>> On Fri, May 22, 2015 at 12:14 AM, Grant Edwards <invalid@invalid.invalid> wrote:
>>> On 2015-05-21, Steven D'Aprano <steve+comp.lang.python@pearwood.info> wrote:
>>>
>>>> import glob
>>>> print(glob.glob("c:/abc/def/ghjmain/features/XYZ/*<filename>"))
>>>>
>>>> Don't use backslashes \ as they have special meaning to Python. Use forward
>>>> slashes and let Python convert them as needed.
>>>
>>> Interesting. I've never heard about this.
>>>
>>> When will Python convert them?
>>
>> Actually, it won't ever bother to convert them.
>
> OK, so this isn't some new feature I hadn't heard about due to my
> spending most of my time with 2.7. :)
>
>> The Windows file system APIs are quite happy to work with forward
>> slashes;
>
> Yep, I knew that -- I have always use forward slashes on Windows (and
> DOS before that) when dealing with the file system.
>
>> it's only command-line tools (which conventionally use forward
>> slashes to introduce options), and not all of them, which require
>> backslashes.
>
Dialog boxes, however, insist on backslashses.
> Yup, I was wondering if that was where Python (or its stdlib) would
> convert them (which would have surprised me). Back in the day, you
> could change the 'option switch' character from '/' to whatever you
> wanted (and as an old Unix guy, I always set it to '-'). Then you
> could even use forward slashes on the command line (mostly). But, I
> don't think Windows has support that for yonks.
>
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Find if a file existing within 1000s of folder/sub-folder - each file has a unique presence chaotic.sid@gmail.com - 2015-05-20 22:34 -0700
Re: Find if a file existing within 1000s of folder/sub-folder - each file has a unique presence Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-05-21 18:07 +1000
Re: Find if a file existing within 1000s of folder/sub-folder - each file has a unique presence Peter Otten <__peter__@web.de> - 2015-05-21 10:54 +0200
Re: Find if a file existing within 1000s of folder/sub-folder - each file has a unique presence Tim Golden <mail@timgolden.me.uk> - 2015-05-21 10:06 +0100
Re: Find if a file existing within 1000s of folder/sub-folder - each file has a unique presence Grant Edwards <invalid@invalid.invalid> - 2015-05-21 14:14 +0000
Re: Find if a file existing within 1000s of folder/sub-folder - each file has a unique presence Chris Angelico <rosuav@gmail.com> - 2015-05-22 00:27 +1000
Re: Find if a file existing within 1000s of folder/sub-folder - each file has a unique presence Grant Edwards <invalid@invalid.invalid> - 2015-05-21 16:31 +0000
Re: Find if a file existing within 1000s of folder/sub-folder - each file has a unique presence MRAB <python@mrabarnett.plus.com> - 2015-05-21 17:54 +0100
Re: Find if a file existing within 1000s of folder/sub-folder - each file has a unique presence Tim Golden <mail@timgolden.me.uk> - 2015-05-21 15:32 +0100
csiph-web