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

Function shellglob

IPython/utils/path.py:314–327  ·  view source on GitHub ↗

Do glob expansion for each element in `args` and return a flattened list. Unmatched glob pattern will remain as-is in the returned list.

(args)

Source from the content-addressed store, hash-verified

312
313
314def shellglob(args):
315 """
316 Do glob expansion for each element in `args` and return a flattened list.
317
318 Unmatched glob pattern will remain as-is in the returned list.
319
320 """
321 expanded = []
322 # Do not unescape backslash in Windows as it is interpreted as
323 # path separator:
324 unescape = unescape_glob if sys.platform != 'win32' else lambda x: x
325 for a in args:
326 expanded.extend(glob.glob(a) or [unescape(a)])
327 return expanded
328
329
330def target_outdated(target,deps):

Callers 1

runMethod · 0.90

Calls 1

unescapeFunction · 0.85

Tested by

no test coverage detected