[docs] [issue8402] Add a way to escape metacharacters in glob/fnmatch

Ezio Melotti report at bugs.python.org
Mon Oct 15 16:16:14 CEST 2012

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

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 at bugs.python.org>

More information about the docs mailing list