CommandResult#

class scikitplot._ipymagic.CommandResult(argv, command, mode, exit_code, stdout, stderr, duration, data=None, timed_out=False, truncated=False)[source]#

The outcome of one scikitplot command run from a notebook or Python.

Parameters:
argvtuple of str

Arguments given to scikitplot (without the program name).

commandstr or None

Registered command that ran (canonical name), None for the root (--help, --version).

mode{“in-process”, “subprocess”}

Where it ran.

exit_codeint

Exit status (124 when the timeout stopped it; an interrupt raises KeyboardInterrupt instead of returning a result).

stdout, stderrstr

Captured output (bounded; see truncated).

durationfloat

Seconds.

dataobject, default=None

Parsed stdout of a --format json run; None otherwise or when stdout was not JSON.

timed_outbool, default=False

Stopped because the timeout elapsed.

truncatedbool, default=False

Captured output was cut to the capture limit; output shown while the command ran was not, output shown after it ends with a note.

Parameters:
argv: tuple[str, ...][source]#
command: str | None[source]#
data: Any = None#
duration: float[source]#
exit_code: int[source]#
mode: str[source]#
property ok: bool#

Whether the command exited with status 0 (bool).

stderr: str[source]#
stdout: str[source]#
summary()[source]#

Return the one-line status of the run.

Returns:
str

"scikitplot <command>: exit <n> in <t> s (<mode>)" plus the reason it was stopped, if it was.

Return type:

str

timed_out: bool = False#
to_dict()[source]#

Return the result as plain data (JSON-serialisable).

Returns:
dict

Every field; argv as a list.

Return type:

dict[str, Any]

truncated: bool = False#