class documentation

class MMBasic(mmbasic.MMBasic):

Constructor: MMBasic(view_manager, present_ticks)

View In Hierarchy

A class representing the MMBasic interpreter for Picoware.

Method __init__ Initialize the MMBasic interpreter with view manager colors.
Method run Poll buttons, tick the interpreter, redraw the console/graphics.
Method start Run the provided MMBasic source code.
Class Variable __slots__ Undocumented
Property is_over True when the program has reached a terminal state (END/STOP).
Method _feed_button Feed a button press into the interpreter as a character.
Instance Variable _over Undocumented
Instance Variable _present_countdown Undocumented
Instance Variable _present_ticks Undocumented
Instance Variable _view_manager Undocumented
def __init__(self, view_manager, present_ticks: int = 20):

Initialize the MMBasic interpreter with view manager colors.

Parameters
view_manager:ViewManagerThe ViewManager instance for the app.
present_ticks:intTicks between graphics screen updates. Defaults to 20.
def run(self) -> bool:

Poll buttons, tick the interpreter, redraw the console/graphics.

Returns False when the program is over (END/STOP) or the user pressed BACK, so the host app can return to the menu. Graphics programs keep their final image on screen (the app shows it until BACK is pressed).

def start(self, source=None, path=None) -> bool:

Run the provided MMBasic source code.

Parameters
source:strThe MMBasic source code to run. Defaults to None.
path:strPath to a file containing MMBasic source. Defaults to None.
Returns
boolTrue if the program started successfully.
__slots__: tuple[str, ...] =

Undocumented

@property
is_over: bool =

True when the program has reached a terminal state (END/STOP).

def _feed_button(self, button):

Feed a button press into the interpreter as a character.

Parameters
button:intThe button code to feed.
_over: bool =

Undocumented

_present_countdown =

Undocumented

_present_ticks =

Undocumented

_view_manager =

Undocumented