widgets.julia_repl_widget
¶
Class for a custom RichJupyterWidget to use as julia REPL.
author: |
|
---|---|
date: | 22.5.2018 |
Module Contents¶
-
class
widgets.julia_repl_widget.
CustomQtKernelManager
[source]¶ Bases:
qtconsole.manager.QtKernelManager
A QtKernelManager with a custom restarter, and a means to override the –project argument.
-
class
widgets.julia_repl_widget.
JuliaREPLWidget
(toolbox)[source]¶ Bases:
qtconsole.rich_jupyter_widget.RichJupyterWidget
Class for a custom RichJupyterWidget.
-
julia_kernel_name
(self)[source]¶ Returns the name of the julia kernel specification, according to the selected julia interpreter in settings. Returns None if julia version cannot be determined.
-
start_jupyter_kernel
(self)[source]¶ Start a Julia Jupyter kernel if available.
Returns: True if the kernel is started, or in process of being started (installing/reconfiguring IJulia) False if the kernel cannot be started and the user chooses not to install/reconfigure IJulia
-
start_available_jupyter_kernel
(self)[source]¶ Start a Jupyter kernel which is available (from the attribute kernel_name)
Returns: True if the kernel is started, or in process of being started (reconfiguring IJulia) False if the kernel cannot be started and the user chooses not to reconfigure IJulia
-
check_ijulia
(self)[source]¶ Check if IJulia is installed, returns True, False, or None if unable to determine.
-
handle_repl_failed_to_start
(self)[source]¶ Prompt user to install IJulia if missing, or rebuild it otherwise.
Returns: Boolean value depending on whether or not the problem is being handled.
-
restart_jupyter_kernel
(self)[source]¶ Restart the julia jupyter kernel if it’s already started. Otherwise, or if the julia version has changed in settings, start a new jupyter kernel.
-
_handle_kernel_restarted
(self, died=True)[source]¶ Called when the kernel is restarted, i.e., when time to dead has elapsed.
-
_handle_kernel_left_dead
(self)[source]¶ Called when the kernel is finally declared dead, i.e., the restart limit has been reached.
-
handle_ijulia_installation_finished
(self, ret)[source]¶ Run when IJulia installation process finishes
-
check_ijulia_process
(self, ret)[source]¶ Check whether or not the IJulia process finished successfully
-
_handle_status
(self, msg)[source]¶ Handle status message. If we have a command in line and the kernel reports status ‘idle’, execute that command.
-
execute_instance
(self, command)[source]¶ Try and start the jupyter kernel. Execute command immediately if kernel is idle. If not, it will be executed as soon as the kernel becomes idle (see _handle_status method).
Reimplemented to add an action for (re)start REPL action.
-