def build_builtin_command(self): com = Command('builtins', 'Go to builtin commands menu') def _run(*args, **kwargs): self.put(""" Commands can conditionally lead the user to other menus. This demo app has two menus defined: the main menu and the built-in commands menu. The command you just ran has defined the attribute self.new_menu to point to the builtins menu. Notice that the options menu has changed to reflect the new commands available in this menu. """) return constants.CHOICE_VALID com.run = _run com.new_menu = 'builtins' return com