spinetoolbox.widgets.spine_console_widget¶
Class for a custom RichJupyterWidget that can run Tool instances.
| authors: |
|
|---|---|
| date: | 22.10.2019 |
Module Contents¶
Classes¶
SpineConsoleWidget |
Base class for all embedded console widgets that can run tool instances. |
-
class
spinetoolbox.widgets.spine_console_widget.SpineConsoleWidget(toolbox, name)[source]¶ Bases:
qtconsole.rich_jupyter_widget.RichJupyterWidgetBase class for all embedded console widgets that can run tool instances.
Parameters: - toolbox (ToolboxUI) – QMainWindow instance
- name (str) – Console name, e.g. ‘Python Console’
Starts chosen Python/Julia kernel if available and not already running. Context menu start action handler.
Restarts chosen 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.
-
wake_up(self, k_name=None)[source]¶ Wakes up the console in preparation for execution. Either ready_to_execute or execution_failed signal must be emitted as a consequence of calling this method.
-
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.