I have created a script using argparse.
argparse
The script needs to take a configuration file name as an option, and user can specify whether they need to proceed t
As @Felix Kling suggested use action='store_true':
action='store_true'
>>> from argparse import ArgumentParser >>> p = ArgumentParser() >>> _ = p.add_argument('-f', '--foo', action='store_true') >>> args = p.parse_args() >>> args.foo False >>> args = p.parse_args(['-f']) >>> args.foo True