MagicSettings#

class scikitplot._ipymagic.MagicSettings(raise_on_error=False, timeout=None, isolate=False, stream=True)[source]#

Behaviour of the magics for one IPython session.

Parameters:
raise_on_errorbool, default=False

Raise CommandFailedError for a non-zero exit status.

timeoutfloat or None, default=None

Seconds a subprocess command may run; None for no limit.

isolatebool, default=False

Run native commands in a subprocess too.

streambool, default=True

Show subprocess output as it is produced.

Parameters:
isolate: bool = False#
raise_on_error: bool = False#
stream: bool = True#
timeout: float | None = None#
to_dict()[source]#

Return the settings as plain data.

Returns:
dict

Every setting.

Return type:

dict[str, Any]

updated(text)[source]#

Return the settings with key=value assignments applied.

Parameters:
textstr

Space-separated key=value pairs.

Returns:
MagicSettings

New settings (self is unchanged).

Raises:
MagicUsageError

For an unknown name, a malformed pair or a bad value (no change is applied).

Parameters:

text (str)

Return type:

MagicSettings

Examples

>>> from scikitplot._ipymagic import MagicSettings
>>> MagicSettings().updated("raise_on_error=true timeout=60").timeout
60.0