wonkodv / hanstool

A shell-like python frontend with various user interfaces
Other
0 stars 0 forks source link

Hotkey Frontend #3

Closed ujeropoc closed 8 years ago

ujeropoc commented 8 years ago

All Frontends implement the following set of module-level methods

Frontends are loaded by ht3.__main__ depending on if arguments, for example to load all frontends do python -m ht3 -s scripts -f ht3.hotkey -f ht3.gui -f ht3.cli

Commands are executed from the thread of the frontend without any syncronization by default. if they have the attribute async, they are executed in their own thread, if they have the attribute sync, they are queued for execution by one thread. Defaults for sync and async are false, but this may change.

ujeropoc commented 8 years ago

The Env contains a method _report_exception which can be implemented by cli or gui frontend and is called by run_command on any kind of exception. it should reraise Shutdown, cli should catch KeyboardInterrupt and the rest should be caught and displayed.

wonkodv commented 8 years ago

there won't be a sync attribute for now.