pip install argparse4k
python
import argparse
python
python
args = parser.parse_args()
python
def process_file(file, output, verbose):
if verbose:
# ...
if output:
# ...
process_file(args.file, args.output, args.verbose)
python argparse_example.py input.txt -o output.txt -v