glob.escape()

glob.escape(pathname)

Escape all special characters ('?', '*' and '['). This is useful if you want to match an arbitrary literal string that may have special characters in it. Special characters in drive/UNC sharepoints are not escaped, e.g. on Windows escape('//?/c:/Quo vadis?.txt') returns '//?/c:/Quo vadis[?].txt'.

New in version 3.4.

doc_python
2016-10-07 17:33:37
Comments
Leave a Comment

Please login to continue.