Answers for "python argparse include default information"

1

python argparse include default information

# Basic syntax:
parser.add_argument("-t", "--threads", default=10, 
                    help="number of threads to use [default: %(default)s]")

# this will print help messages that look like:
-t THREADS, --threads THREADS
                        number of threads to use [default: 10]
Posted by: Guest on April-04-2022

Python Answers by Framework

Browse Popular Code Answers by Language