Isaac Muse added the comment:
If this was to be done, you'd want to make sure character sequences also match
hidden files: [.]. Just * and ? would be incomplete. If allowing ** to match a
leading dot, it would not match . or ..
--
nosy: +Isaac
Isaac Muse added the comment:
Sadly, this because pathlib glob and glob.glob use different implementations.
And glob.glob does not provide something equivalent to a DOTALL flag allowing a
user to glob hidden files without explicitly defining the leading dot in the
pattern.
--
nosy
Isaac Muse added the comment:
Wrong thread sorry
--
___
Python tracker
<https://bugs.python.org/issue39682>
___
___
Python-bugs-list mailing list
Unsubscribe:
Isaac Muse added the comment:
Brace expansion does not currently exist in Python's glob. You'd have to use a
third party module to expand the braces and then run glob on each returned
pattern, or use a third party module that implements a glob that does it for
you.
Shameless pl
Isaac Muse added the comment:
Brace expansion does not currently exist in Python's glob. You'd have to use a
third party module to expand the braces and then run glob on each returned
pattern, or use a third party module that implements a glob that does it for
you.
Shameless pl
Isaac Muse added the comment:
The more I think about this, I think the normalization of paths is actually
fine, it is the normalization of the patterns that is problematic, or more the
difference in normalization. I could live with the pattern normalization of `.`
and trailing `/` if it was
New submission from Isaac Muse :
It appears that the pathlib library strips out `.` in glob paths when they
represent a directory. This is kind of a naive approach in my opinion, but I
understand what was trying to be achieved.
When a path is given to pathlib, it normalizes it by stripping
Isaac Muse added the comment:
I think the idea of adding a globmatch function is a decent idea.
That is what I did in a library I wrote to get more out of glob than what
Python offered out of the box:
https://facelessuser.github.io/wcmatch/pathlib/#purepathglobmatch.
Specifically the