spinetoolbox.widgets.spine_console_widget
¶
Class for a custom RichJupyterWidget that can run Tool instances.
- authors
Marin (KTH), P. Savolainen (VTT)
- date
22.10.2019
Module Contents¶
Classes¶
Base class for all embedded console widgets that can run tool instances. |
Attributes¶
- class spinetoolbox.widgets.spine_console_widget.SpineConsoleWidget(toolbox, name, owner=None)[source]¶
Bases:
qtconsole.rich_jupyter_widget.RichJupyterWidget
Base class for all embedded console widgets that can run tool instances.
- Parameters
toolbox (ToolboxUI) – QMainWindow instance
name (str) – Console name, e.g. ‘Python Console’
owner (ProjectItem, NoneType) – Item that owns the console.
- start_console(self, checked=False)[source]¶
Starts chosen Python/Julia kernel if available and not already running. Context menu start action handler.
- restart_console(self, checked=False)[source]¶
Restarts current Python/Julia kernel. Starts a new kernel if it is not running or if chosen kernel has been changed in Settings. Context menu restart action handler.
- call_start_kernel(self, k_name=None)[source]¶
Finds a valid kernel and calls
start_kernel()
with it.
- start_kernel(self, k_name, k_path)[source]¶
Starts a kernel manager and kernel client and attaches the client to Julia or Python Console.
- Parameters
k_name (str) – Kernel name
k_path (str) – Directory where the the kernel specs are located
Reimplemented to add actions to console context-menus.