How do I remove/unlink wildcarded files

Mark Lawrence breamoreboy at yahoo.co.uk
Fri Jan 2 10:18:45 EST 2015


On 02/01/2015 14:01, Chris Angelico wrote:
> On Sat, Jan 3, 2015 at 12:51 AM, Ervin Hegedüs <airween at 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
>

Did you have to mention unicode?  Next thing you know it'll be "Is it a 
bird, is it a plane, no, it's our resident unicode expert!!!" :)

-- 
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence




More information about the Python-list mailing list