From anonymous, 5 Years ago, written in Plain Text.
Embed
  1. - class Command
  2. - subclasses CmdFoo
  3. - automatically discovered and register() called with dir() -> filter Cmd.*
  4. - method register() which registers keybindings / command-names
  5.    also has nargs=n/?/*/+ like argparse with arg-checking via base-class
  6. - method call(*args) which calls the command with args
  7. - command module has lots of signals/slots to communicate with mainwindow, which are bound in main-context
  8.   - check how to return values from slots (e.g. for a confirm-prompt in statusbar)
  9.