def usage(command_usage):
    with open(Defaults.project_file('cli.py'), 'r') as cli:
        program_code = cli.readlines()

    global_options = '\n'
    process_lines = False
    for line in program_code:
        if line.rstrip() == 'global options:':
            process_lines = True
        if line.rstrip() == '"""':
            process_lines = False
        if process_lines:
            global_options += format(line)

    print 'usage: azurectl [global options] service <command> [<args>]\n'
    print format(command_usage).replace('usage:', '      ')
    if 'global options:' not in command_usage:
        print format(global_options)
Instead of the docopt way to show the usage information we
dataset/ETHPy150Open SUSE/azurectl/azurectl/azurectl.py/usage