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 <[email protected]>
<http://bugs.python.org/issue8402>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com