rgpycrumbs.run.jupyter

Functions

_run_command_live(→ subprocess.CompletedProcess)

Internal: run command and stream stdout/stderr live to current stdout.

run_command_or_exit(→ subprocess.CompletedProcess)

Helper wrapper to run commands, stream output, and exit script/notebook

Module Contents

rgpycrumbs.run.jupyter._run_command_live(cmd: str | list[str], *, check: bool = True, timeout: float | None = None, capture: bool = False, encoding: str = 'utf-8') subprocess.CompletedProcess[source]

Internal: run command and stream stdout/stderr live to current stdout. If capture=True, also collect combined output and return it in CompletedProcess.stdout.

rgpycrumbs.run.jupyter.run_command_or_exit(cmd: str | list[str], capture: bool = False, timeout: float | None = 300) subprocess.CompletedProcess[source]

Helper wrapper to run commands, stream output, and exit script/notebook cleanly on failure so sphinx-gallery sees the errors appropriately.