Currently I am using the following code to initialize my ArgumentParser
:
parser = argparse.ArgumentParser(description="Help line 1\n" +
"Help line 2",
formatter_class=argparse.RawTextHelpFormatter)
Which, after adding some arguments, gives me the following output:
/usr/bin/python3.6 /data/Poseidon/dev/Python/trident.py -h
usage: trident.py [-h] [--verbose] [--images] --source SOURCE --network
NETWORK
Help line 1
Help line 2
I would rather not have the "NETWORK" argument in the "usage" part of the help output in the next line, but on the same line. Is there any way to tell argparse
to not add newlines in the list of arguments?