Help system¶
Used in conjunction with the command router, the help system automatically generates help entries for commands.
Adding the help system to your command router.¶
To use the help system, add it to your command router like any other command:
from pax25 import Application
from pax25.applications.router import CommandRouter
from pax25.applications.help import Help
class MyApplication(Application):
...
def setup(self):
...
self.router = CommandRouter()
# Generates the help command.
help_command = Help(self.router).spec
# Adds it to the command router.
self.router.add(Help(self.router).spec)
Now, when the user types 'help', they will see all registered commands listed. They can type help command where command is the name they want to learn more about, and they should receive a help entry based on the help field of the command spec.