Message172973
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. |
|
Date |
User |
Action |
Args |
2012-10-15 14:16:14 | ezio.melotti | set | recipients:
+ ezio.melotti, terry.reedy, eric.smith, kveretennicov, eric.araujo, l0nwlf, george.hu, docs@python, maker, Aquinas, Tilka, serhiy.storchaka, a1abhishek |
2012-10-15 14:16:14 | ezio.melotti | set | messageid: <1350310574.52.0.388722306768.issue8402@psf.upfronthosting.co.za> |
2012-10-15 14:16:14 | ezio.melotti | link | issue8402 messages |
2012-10-15 14:16:14 | ezio.melotti | create | |
|