python print a help of a script

Solutions on MaxInterview for python print a help of a script by the best coders in the world

showing results for - "python print a help of a script"
Matteo
09 May 2016
1# credit to the Stack Overflow user in the source link
2import argparse
3
4parser=argparse.ArgumentParser(
5    description='''My Description. And what a lovely description it is. ''',
6    epilog="""All is well that ends well.""")
7parser.add_argument('--foo', type=int, default=42, help='FOO!')
8parser.add_argument('bar', nargs='*', default=[1, 2, 3], help='BAR!')
9args=parser.parse_args()
similar questions
queries leading to this page
python print a help of a script