MCPcopy Create free account
hub / github.com/ipython/ipython / unescape_glob

Function unescape_glob

IPython/utils/path.py:305–311  ·  view source on GitHub ↗

Unescape glob pattern in `string`.

(string)

Source from the content-addressed store, hash-verified

303
304
305def unescape_glob(string):
306 """Unescape glob pattern in `string`."""
307 def unescape(s):
308 for pattern in '*[]!?':
309 s = s.replace(r'\{0}'.format(pattern), pattern)
310 return s
311 return '\\'.join(map(unescape, string.split('\\\\')))
312
313
314def shellglob(args):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected