import argparse
parser = argparse.ArgumentParser(
# formatter_class=argparse.RawDescriptionHelpFormatter,
description="""
Calculate X to the power of Y
was indented weird
but that is okay,
""")
group = parser.add_mutually_exclusive_group()
group.add_argument("-v", "--verbose", action="store_true")
group.add_argument("-q", "--quiet", action="store_true")
parser.add_argument('-s', '--size', metavar='COLS', help='monty python is good or bad?')
parser.add_argument("y", type=int, help="the exponent")
parser.add_argument("x", type=int, help="Foo Bar Monty Python" * 20)
long_help = """
FIRST 1
SECOND 2
THIRD 3
"""
parser.add_argument('--number', help=long_help)
bugs = """
GNU coreutils online help:
Report ls translation bugs to
"""
parser.add_manpage_section("reporting bugs", content=bugs)
parser.add_manpage_section("COPYRIGht", content=r"\(co This is free software: you are free to change and redistribute it.There is NO WARRANTY, to the extent permitted by law.")
if __name__ == '__main__':
parser.print_manpage()