Contain a tab for displaying files.


get_format(path[, default])

Attempt to guess the format of a path.

run_in_thread_with_context(func, *args[, daemon])

Run a function in an thread, but make sure it uses the same contextvars.


Datum(data, *args, **kwargs)

Class for storing and converting display data.

Dimension([min, max, weight, preferred])

Specified dimension (width/height) of a user control or window.

Display(datum[, height, width, focusable, ...])

Rich output displays.

DisplayTab(app[, path])

Tab class for displaying files.

MarginContainer(margin, target)

A container which renders a stand-alone margin.

ScrollbarMargin([display_arrows, ...])

Margin displaying a scrollbar.

Tab(app[, path])

Base class for interface tabs.

VSplit(children[, window_too_small, align, ...])

Several layouts, one stacked left/right of the other.

class euporie.notebook.tabs.display.DisplayTab(app: BaseApp, path: Path | None = None)

Bases: Tab

Tab class for displaying files.

close(cb: Callable | None = None) None

Close a tab with a callback.


cb – A function to call after the tab is closed.

container: AnyContainer
file_extensions: ClassVar[dict[str, None]] = {}
focus() None

Focus the tab (or make it visible).

load_container() AnyContainer

Abcract method for loading the notebook’s main container.

mime_types: ClassVar[set[str]] = {'*', 'application/pdf', 'application/x-latex', 'image/gif', 'image/jpeg', 'image/png', 'image/svg+xml', 'stream/std*', 'text/*', 'text/html', 'text/latex', 'text/markdown', 'text/x-markdown'}
name: str | None = 'File Viewer'
reset() None

Reset the state of the tab.

save(path: Path | None = None, cb: Callable | None = None) None

Save the current notebook.

property title: str

Return the tab title.

weight: int = 0