euporie.notebook.tabs.console
Contain the main class for a notebook file.
Functions
|
Create a new code cell, without validation. |
Classes
|
Special type indicating an unconstrained type. |
|
Base class for Consoles. |
|
Draw a border around any container. |
|
An area below a cell where one or more cell outputs can be shown. |
|
Turn any callable into a Filter. |
|
Wrapper around any other container that can change the visibility. |
|
Console tab implementation for the Notebook application. |
|
Specified dimension (width/height) of a user control or window. |
|
Apply a style to child containers when focused or hovered. |
|
Control that displays formatted text. |
|
Several layouts, one stacked above/under the other. |
|
Kernel input text areas. |
|
A container which renders a stand-alone margin. |
|
Margin displaying a scrollbar. |
|
A scrollable container which renders only the currently visible children. |
|
A widget to accept kernel input. |
|
Several layouts, one stacked left/right of the other. |
|
Container that holds a control. |
|
Create a new function with partial application of the given arguments and keywords. |
- class euporie.notebook.tabs.console.Console(app: BaseApp, path: Path | None = None, use_kernel_history: bool = True, connection_file: str = '')
Bases:
BaseConsoleConsole tab implementation for the Notebook application.
- bg_init = False
- change_kernel(msg: str | None = None, startup: bool = False) None
Prompt the user to select a new kernel.
- clear_output(wait: bool = False) None
Remove all cells from history.
- Parameters:
wait – If True, clear output when new output is generated.
- comm_open(content: dict, buffers: Sequence[bytes]) None
Register a new kernel Comm object in the notebook.
- container: AnyContainer
- property current_input: KernelInput
Return the currently active kernel input, if any.
- default_callbacks: MsgCallbacks
- init_kernel(kernel: BaseKernel | None = None, comms: dict[str, Comm] | None = None, use_kernel_history: bool = False, connection_file: Path | None = None) None
Set up the tab’s kernel and related components.
- input_box: KernelInput
- kernel: BaseKernel
- property kernel_display_name: str
Return the display name of the kernel defined in the notebook JSON.
- property kernel_lang_file_ext: str
Return the display name of the kernel defined in the notebook JSON.
- lang_file_ext() str
Return the file extension for scripts in the notebook’s language.
- Returns:
The file extension including the leading dot.
- new_input(input_json: dict[str, Any], own: bool, force: bool = False) None
Create new cell inputs in response to kernel
execute_inputmessages.- Parameters:
input_json – The input data from the kernel message.
own – Whether this input originated from this console.
force – Whether to force rendering even if it’s our own input.
- new_output(output_json: dict[str, Any], own: bool) None
Handle new output from the kernel.
- Parameters:
output_json – The output data from the kernel message.
own – Whether this output originated from this console.
- prompt(text: str, count: int | None = None, offset: int = 0, show_busy: bool = False) StyleAndTextTuples
Determine what should be displayed in the prompt of the cell.
- reports: WeakKeyDictionary[LspClient, Report]
- set_kernel_info(info: dict) None
Receive and process kernel metadata.
- Parameters:
info – Kernel information dictionary.
- suggester: AutoSuggest