analyzer.cli.browser

Classes

ResultBrowser

The base class for Textual Applications.

ResultTree

A Widget is the base class for Textual widgets.

HistogramViewer

A Widget is the base class for Textual widgets.

ResultViewer

A Widget is the base class for Textual widgets.

Functions

formatSize(→ str)

Module Contents

analyzer.cli.browser.formatSize(size_in_bytes: int) str[source]
class analyzer.cli.browser.ResultBrowser(results)[source]

Bases: textual.app.App

The base class for Textual Applications.

CSS = Multiline-String[source]
Show Value
"""
    #sidebar {
        width: 30%;
        height: 100%;
        dock: left;
    }
    #search_input {
        dock: top;
        margin: 1;
    }
    ResultTree {
        width: 100%;
        height: 100%;
    }
    ResultViewer {
        width: 70%;
        height: 100%;
        padding-left: 2;
        border-left: solid $panel;
    }
    HistogramViewer {
        width: 100%;
        height: 100%;
        padding: 1;
    }
    .axis_controls {
        height: auto;
        min-height: 5;
        margin-bottom: 1;
    }
    .axis_control {
        margin: 1;
        padding: 0;
        width: 1fr;
        height: auto;
    }
    #hist_control_grid {
        height: auto;
        min-height: 5;
    }
    PlotextPlot {
        height: 1fr;
        min-height: 20;
    }
    #console_container {
        height: 15;
        border-top: solid $panel;
        dock: bottom;
    }
    #console_log {
        height: 1fr;
    }
    #console_input {
        dock: bottom;
    }
    """

Inline CSS, useful for quick scripts. This is loaded after CSS_PATH, and therefore takes priority in the event of a specificity clash.

TITLE = 'Result Browser'[source]

A class variable to set the default title for the application.

To update the title while the app is running, you can set the [title][textual.app.App.title] attribute. See also [the Screen.TITLE attribute][textual.screen.Screen.TITLE].

results[source]
viewer[source]
compose() textual.app.ComposeResult[source]

Compose the application layout.

handleConsoleSubmit(event)[source]
handleSearch(event)[source]
handleSelected(message)[source]
on_button_pressed() None[source]
class analyzer.cli.browser.ResultTree(results, **kwargs)[source]

Bases: textual.widget.Widget

A Widget is the base class for Textual widgets.

See also [static][textual.widgets._static.Static] for starting point for your own widgets.

search_term[source]
results[source]
compose() textual.app.ComposeResult[source]

Called by Textual to create child widgets.

This method is called when a widget is mounted or by setting recompose=True when calling [refresh()][textual.widget.Widget.refresh].

Note that you don’t typically need to explicitly call this method.

Example:

```python def compose(self) -> ComposeResult:

yield Header() yield Label(“Press the button below:”) yield Button() yield Footer()

```

class analyzer.cli.browser.HistogramViewer(histogram_result: analyzer.core.results.Histogram, **kwargs)[source]

Bases: textual.widget.Widget

A Widget is the base class for Textual widgets.

See also [static][textual.widgets._static.Static] for starting point for your own widgets.

histogram_result[source]
hist_obj[source]
axes[source]
getAxisOptions(axis)[source]
compose() textual.app.ComposeResult[source]

Compose the histogram viewer controls and plot.

on_mount()[source]
updatePlot(event=None)[source]
class analyzer.cli.browser.ResultViewer(**kwargs)[source]

Bases: textual.widget.Widget

A Widget is the base class for Textual widgets.

See also [static][textual.widgets._static.Static] for starting point for your own widgets.

result[source]
showResult(result)[source]
compose()[source]

Called by Textual to create child widgets.

This method is called when a widget is mounted or by setting recompose=True when calling [refresh()][textual.widget.Widget.refresh].

Note that you don’t typically need to explicitly call this method.

Example:

```python def compose(self) -> ComposeResult:

yield Header() yield Label(“Press the button below:”) yield Button() yield Footer()

```