示例#1
0
文件: commands.py 项目: matpow2/cuwo
def help(script, name=None):
    """Returns information about commands."""
    if name is None:
        commands = sorted([item.name for item in script.get_commands()])
        return 'Commands: ' + ', '.join(commands)
    else:
        command = script.get_command(name)
        if command is None:
            return 'No such command'
        return command.get_help()
示例#2
0
文件: commands.py 项目: BangL/cuwo
def help(script, name=None):
    if name is None:
        commands = [item.name for item in script.get_commands()]
        commands.sort()
        return 'Commands: ' + ', '.join(commands)
    else:
        command = script.get_command(name)
        if command is None:
            return 'No such command'
        return command.get_help()
示例#3
0
def help(script, name=None):
    """Returns information about commands."""
    if name is None:
        commands = sorted([item.name for item in script.get_commands()])
        return 'Commands: ' + ', '.join(commands)
    else:
        command = script.get_command(name)
        if command is None:
            return 'No such command'
        return command.get_help()
示例#4
0
文件: commands.py 项目: BangL/cuwo
def help(script, name=None):
    if name is None:
        commands = [item.name for item in script.get_commands()]
        commands.sort()
        return 'Commands: ' + ', '.join(commands)
    else:
        command = script.get_command(name)
        if command is None:
            return 'No such command'
        return command.get_help()