You are viewing an older version (9.5.0). Go to latest (9.13.0)
{ } Raw JSON

bundles / IPython 9.5.0 / IPython / utils / _process_common / arg_split

function

IPython.utils._process_common:arg_split

source: /IPython/utils/_process_common.py :184

Signature

def   arg_split ( s posix = False strict = True )

Summary

Split a command line's arguments in a shell-like manner.

Extended Summary

This is a modified version of the standard library's shlex.split() function, but with a default of posix=False for splitting, so that quotes in inputs are respected.

if strict=False, then any errors shlex.split would raise will result in the unparsed remainder being the last element of the list, rather than raising. This is because we sometimes use arg_split to parse things other than command-line args.

Aliases

  • IPython.core.completer.arg_split