コード例 #1
0
 def help(self, command):
     """Show a help message about a command."""
     try:
         f = self.__getattribute__(command)
     except AttributeError:
         self.system_message("No such command.")
     try:
         ConsoleCommand.check(f)
     except ConsoleCommand.NotACommand:
         self.system_message("No such command.")
     self.system_message(ConsoleCommand.help_message(f))
コード例 #2
0
 def test_help_message(self):
     ConsoleCommand.help_message(self.test.cmd1)
     ConsoleCommand.help_message(self.test.cmd2)