route#
- scikitplot._ipymagic.route(argv)[source]#
Return the command
argvnames, as the CLI would find it.- Parameters:
- argvsequence of str
Arguments after
scikitplot.
- Returns:
- Route
The command and how it runs.
- Raises:
- MagicUsageError
When the first word that is not an option is not a command or an alias (and no delegated command follows); the closest names are in the hint.
- Parameters:
- Return type:
Notes
The delegated decision is the CLI’s own (
_split_delegated): the first word anywhere inargvthat names a command decides, so-vq env,--verb envand-v envall delegate, exactly as on the command line. The root parser takes no option with a value, so the first word that is not an option is the one argparse and click read as the command.Examples
>>> from scikitplot._ipymagic import route >>> route(["-v", "env", "plan"]) Route(command='env', delegated=True)
Gallery examples#
Clean a Prompt in a Notebook Cell with %%scikitplot
Clean a Prompt in a Notebook Cell with %%scikitplot
Inspect and Self-test the MCP Server from a Notebook
Inspect and Self-test the MCP Server from a Notebook