module documentation

REPL App for Picoware Copyright (c) 2026 JBlanked GPL-3.0 License https://www.github.com/jblanked/Picoware Last Updated: 2026-05-07

Function run Run the app.
Function start Start the app.
Function stop Stop the app.
Function __parse Execute input text and return the output as a string.
Function _commit_input Append the output and a new prompt to the editor's existing text.
Function _continue_input Append a continuation prompt for multi-line input.
Function _get_current_input Return the text between the last prompt and the cursor.
Function _is_incomplete Return True if line opens a multi-line block and needs continuation.
Function _record_input Add a non-empty input to command history.
Function _replace_current_input Replace the input on the current prompt line.
Function _show_next_input Load the next input from command history.
Function _show_previous_input Load the previous input from command history.
Constant _PROMPT Undocumented
Constant _PROMPT_CONT Undocumented
Variable _history Undocumented
Variable _history_draft Undocumented
Variable _history_index Undocumented
Variable _multiline_buffer Undocumented
Variable _repl_context Undocumented
Variable _text_editor Undocumented
def run(view_manager):

Run the app.

Parameters
view_manager:ViewManagerThe view manager context.
def start(view_manager) -> bool:

Start the app.

Parameters
view_manager:ViewManagerThe view manager context.
Returns
boolTrue on success.
def stop(view_manager):

Stop the app.

Parameters
view_manager:ViewManagerThe view manager context.
def __parse(text: str) -> str:

Execute input text and return the output as a string.

Parameters
text:strThe input to execute.
Returns
strThe executed output.
def _commit_input(output: str):

Append the output and a new prompt to the editor's existing text.

Parameters
output:strThe output to append.
def _continue_input():

Append a continuation prompt for multi-line input.

def _get_current_input() -> str:

Return the text between the last prompt and the cursor.

def _is_incomplete(line: str) -> bool:

Return True if line opens a multi-line block and needs continuation.

Parameters
line:strThe line to check.
Returns
boolTrue if more input is needed.
def _record_input(value: str):

Add a non-empty input to command history.

def _replace_current_input(value: str):

Replace the input on the current prompt line.

def _show_next_input():

Load the next input from command history.

def _show_previous_input():

Load the previous input from command history.

_PROMPT =

Undocumented

Value
const('>>> ')
_PROMPT_CONT =

Undocumented

Value
const('... ')
_history: list =

Undocumented

_history_draft: str =

Undocumented

_history_index: int =

Undocumented

_multiline_buffer: list =

Undocumented

_repl_context: dict =

Undocumented

_text_editor =

Undocumented