euporie.notebook.tabs.edit
Contain a tab for displaying files.
Functions
|
Detect the pygments lexer for a file. |
|
Assign key-bindings to commands based on a dictionary. |
Classes
|
Specified dimension (width/height) of a user control or window. |
|
Tab class for editing text files. |
|
Several layouts, one stacked above/under the other. |
|
Run a notebook kernel and communicates with it asynchronously. |
|
Kernel input text areas. |
|
A Tab which connects to a kernel. |
Typed dictionary for named message callbacks. |
|
|
A path for untitled files, as needed for LSP servers. |
- class euporie.notebook.tabs.edit.EditorTab(app: BaseApp, path: Path | None = None, kernel: Kernel | None = None, comms: dict[str, Comm] | None = None, use_kernel_history: bool = False)
Bases:
KernelTab
Tab class for editing text files.
- bg_init = True
- change_kernel(msg: str | None = None, startup: bool = False) None
Prompt the user to select a new kernel.
- close(cb: Callable | None = None) None
Check if the user want to save an unsaved notebook, then close the file.
- Parameters:
cb – A callback to run if after closing the notebook.
- 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: Kernel | 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.
- 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.
- kernel_started(result: dict[str, Any] | None = None) None
Task to run when the kernel has started.
- load_container() AnyContainer
Load the “tab“‘s main container.
- reports: WeakKeyDictionary[LspClient, Report]
- suggester: AutoSuggest