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


Groups > comp.lang.python > #83117

Re: How do I remove/unlink wildcarded files

References (1 earlier) <20150102102153.GA89926@cskk.homeip.net> <20150102053552.6ed449b8@bigbox.christie.dr> <20150102123604.GB24295@arxnet.hu> <CAPTjJmoHV5OxZYfnDaYjrq-SBDdkWPf1uAhtgd47aioK0FoWFQ@mail.gmail.com> <20150102135132.GE24572@arxnet.hu>
Date 2015-01-03 01:01 +1100
Subject Re: How do I remove/unlink wildcarded files
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.17324.1420207299.18130.python-list@python.org> (permalink)

Show all headers | View raw


On Sat, Jan 3, 2015 at 12:51 AM, Ervin Hegedüs <airween@gmail.com> wrote:
> it may be at the concrete example in OP is better the glob - but
> I think in most cases the re modul gives more flexibility, I mean
> the glob modul can handle the upper/lower chars?

I'm not sure that I'd want to. Handling case insensitivity is fine
when you're restricting everything to ASCII, but it's rather harder
when you allow all of Unicode. For instance, U+0069 and U+0049 would
be considered case-insensitively equal in English, but in Turkish,
they're different letters; U+0069 upper-cases to U+0130, and U+0049
lower-cases to U+0131. Much safer, when you're writing generic tools,
to simply require case sensitivity. And you can't easily know whether
the file system is case-sensitive, case-retaining, or case-folding;
you could easily have multiple mounts that differ, so
"/home/rosuav/foo/bar/quux" might be the same as
"/home/rosuav/FOO/bar/quux", but the other four components are all
case sensitive. Yes, it really is possible.

ChrisA

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


Thread

Re: How do I remove/unlink wildcarded files Chris Angelico <rosuav@gmail.com> - 2015-01-03 01:01 +1100
  Re: How do I remove/unlink wildcarded files Rick Johnson <rantingrickjohnson@gmail.com> - 2015-01-02 09:15 -0800
    Re: How do I remove/unlink wildcarded files Rustom Mody <rustompmody@gmail.com> - 2015-01-02 09:54 -0800
      Re: How do I remove/unlink wildcarded files Chris Angelico <rosuav@gmail.com> - 2015-01-03 08:08 +1100
        Re: How do I remove/unlink wildcarded files Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-01-03 21:01 +1100
          Re: How do I remove/unlink wildcarded files Chris Angelico <rosuav@gmail.com> - 2015-01-03 21:16 +1100
          Re: How do I remove/unlink wildcarded files Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-01-03 10:38 +0000
            Re: How do I remove/unlink wildcarded files Rick Johnson <rantingrickjohnson@gmail.com> - 2015-01-03 09:53 -0800
              Re: How do I remove/unlink wildcarded files Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-01-03 18:35 +0000
                OT Vernacular and empire building [was Re: How do I remove/unlink wildcarded files] Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-01-05 00:19 +1100
                Re: OT Vernacular and empire building [was Re: How do I remove/unlink wildcarded files] Rick Johnson <rantingrickjohnson@gmail.com> - 2015-01-04 15:22 -0800
              Re: How do I remove/unlink wildcarded files albert@spenarnc.xs4all.nl (Albert van der Horst) - 2015-01-08 13:10 +0000
                Re: How do I remove/unlink wildcarded files Rick Johnson <rantingrickjohnson@gmail.com> - 2015-01-08 07:33 -0800
                Re: How do I remove/unlink wildcarded files Marko Rauhamaa <marko@pacujo.net> - 2015-01-08 19:58 +0200
      Re: How do I remove/unlink wildcarded files Rick Johnson <rantingrickjohnson@gmail.com> - 2015-01-02 15:52 -0800
    Re: How do I remove/unlink wildcarded files Chris Angelico <rosuav@gmail.com> - 2015-01-03 08:09 +1100
      Re: How do I remove/unlink wildcarded files Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2015-01-03 15:18 +1300

csiph-web