def list_commands(args):
    interfaces = get_interfaces(args)
    for interface in interfaces:
        if args.interface and interface['name'] != args.interface:
            continue

        print "> %s:" % interface['name']

        for method in interface['methods']:
            if args.method and method['name'] != args.method:
                continue
            if 'description' in method:
                print '    %s v%i [%s]: %s' % (method['name'], method['version'], method['httpmethod'], method['description'])
            else:
                print '    %s v%i [%s]' % (method['name'], method['version'], method['httpmethod'])

            if args.interface:
                for parameter in method['parameters']:
                    mandatory_mark = '*'
                    if parameter['optional']:
                        mandatory_mark = ' '

                    desc = '        %s %s %s' % (mandatory_mark, parameter['type'], parameter['name'])
                    if 'description' in parameter:
                        desc += ': %s' % (parameter['description'])
                    print desc

    if args.interface:
        print '* = required argument'

    return True
dataset/ETHPy150Open UberEnt/SteamCLI/steamcli.py/list_commands/original