MCPcopy Index your code
hub / github.com/ipython/ipython / shellglob

Function shellglob

IPython/utils/path.py:269–282  ·  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

267
268
269def shellglob(args):
270 """
271 Do glob expansion for each element in `args` and return a flattened list.
272
273 Unmatched glob pattern will remain as-is in the returned list.
274
275 """
276 expanded = []
277 # Do not unescape backslash in Windows as it is interpreted as
278 # path separator:
279 unescape = unescape_glob if sys.platform != 'win32' else lambda x: x
280 for a in args:
281 expanded.extend(glob.glob(a) or [unescape(a)])
282 return expanded
283
284ENOLINK = 1998
285

Callers 1

runMethod · 0.90

Calls 1

unescapeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…