module documentation

Python Editor - Create and edit Python files.

Function run Run the app.
Function start Start the app.
Function stop Stop the app.
Constant STATE_EDITOR Undocumented
Constant STATE_FILE_BROWSER Undocumented
Constant STATE_FILE_TYPE_MENU Undocumented
Constant STATE_INITIAL_MENU Undocumented
Constant STATE_KEYBOARD Undocumented
Function __callback_filename_save Callback for when the filename is saved.
Function __template Return a basic Picoware app template.
Function _start_editor Start the pye editor with the specified filename.
Function _start_file_browser Start the file browser for selecting an existing app.
Function _start_file_type_menu Start the file type menu.
Function _start_initial_menu Start the initial menu to choose between new file or edit existing.
Variable _file_browser Undocumented
Variable _file_type_menu Undocumented
Variable _filename Undocumented
Variable _initial_menu Undocumented
Variable _keyboard_just_started Undocumented
def run(view_manager):

Run the app.

State 0 (INITIAL_MENU): Choose between creating new file or editing existing app State 1 (KEYBOARD): Get filename input from user via keyboard (for new files) State 2 (FILE_TYPE_MENU): Show menu to select file type (Picoware App or Python Script) State 3 (FILE_BROWSER): Show file browser to select existing app to edit State 4 (EDITOR): Launch pye editor with the specified filename

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.
STATE_EDITOR =

Undocumented

Value
const(4)
STATE_FILE_BROWSER =

Undocumented

Value
const(3)
STATE_FILE_TYPE_MENU =

Undocumented

Value
const(2)
STATE_INITIAL_MENU =

Undocumented

Value
const(0)
STATE_KEYBOARD =

Undocumented

Value
const(1)
def __callback_filename_save(result: str):

Callback for when the filename is saved.

Parameters
result:strThe typed filename.
def __template(filename: str) -> str:

Return a basic Picoware app template.

Parameters
filename:strThe app filename.
Returns
strThe template source.
def _start_editor(view_manager, filename=None, create_template=False):

Start the pye editor with the specified filename.

Parameters
view_manager:ViewManagerThe view manager context.
filename:strThe file to edit. Defaults to None.
create_template:boolCreate a template if the file is empty. Defaults to False.
def _start_file_browser(view_manager):

Start the file browser for selecting an existing app.

Parameters
view_manager:ViewManagerThe view manager context.
def _start_file_type_menu(view_manager):

Start the file type menu.

Parameters
view_manager:ViewManagerThe view manager context.
def _start_initial_menu(view_manager):

Start the initial menu to choose between new file or edit existing.

Parameters
view_manager:ViewManagerThe view manager context.
_file_browser =

Undocumented

_file_type_menu =

Undocumented

_filename: str =

Undocumented

_initial_menu =

Undocumented

_keyboard_just_started: bool =

Undocumented