transport_data.cli.interactive.View¶
- class transport_data.cli.interactive.View(app)[source]¶
Bases:
ABCRepresentation of a
Editorview.- __init__(app) None¶
Create and display the view.
Subclasses may override this method, but must call
super().__init__(app).
Methods
Attributes
Default input.
Reference to the Editor.
Reference to the EditorState.
Text to be displayed in the output text area.
Prompt text to be displayed in the input text area.
- abstractmethod accept(text: str) type[View] | None¶
Handle user input.
Subclasses must implement this method. An implementation may return a
Viewsubclass (not instance) to indicate the next View to be displayed; if it returnsNone, thenNEXT_VIEWis used to identify the next View.
- current: EditorState¶
Reference to the EditorState.