[issue8402] Add a way to escape metacharacters in glob/fnmatch
Oct. 15, 2012
2:16 p.m.
Ezio Melotti added the comment: I think the escaping workaround should be documented in the glob and/or fnmatch docs. This way users can simply do: import glob glob.glob("c:\abc\afolderwith[[]test]\*") rather than import glob import fnmatch glob.glob(fnmatch.escape("c:\abc\afolderwith[test]\") + "*") The function might still be useful with patterns constructed programmatically, but I'm not sure how common the problem really is. ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue8402> _______________________________________
4800
Age (days ago)
4800
Last active (days ago)
0 comments
1 participants
participants (1)
-
Ezio Melotti