Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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]
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #argparse #include #default #information
ADD COMMENT
Topic
Name
5+4 =