[issue37578] Change Glob: Allow Recursion for Hidden Files

2021-12-16 Thread Isaac Muse
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

[issue44380] glob.glob handling of * (asterisk) wildcard is broken

2021-06-10 Thread Isaac Muse
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

[issue39682] pathlib.Path objects can be used as context managers

2020-03-05 Thread Isaac Muse
Isaac Muse added the comment: Wrong thread sorry -- ___ Python tracker <https://bugs.python.org/issue39682> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39856] glob : some 'unix style' glob items are not supported

2020-03-05 Thread Isaac Muse
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

[issue39682] pathlib.Path objects can be used as context managers

2020-03-05 Thread Isaac Muse
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

[issue39532] Pathlib: handling of `.` in paths and patterns creates unmatchable paths

2020-02-02 Thread Isaac Muse
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

[issue39532] Pathlib: handling of `.` in paths and patterns creates unmatchable paths

2020-02-02 Thread Isaac Muse
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

[issue29249] Pathlib glob ** bug

2020-01-31 Thread Isaac Muse
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