Message391890
The documentation seems very clear on this subject:
"RawTextHelpFormatter maintains whitespace for all sorts of help text, including argument descriptions. However, multiple new lines are replaced with one."
But consider the following code:
```
from argparse import ArgumentParser, RawDescriptionHelpFormatter
parser = ArgumentParser(
description='A simple templating system.',
epilog='Use `-\' as a file name to indicate standard input or output.',
formatter_class=RawDescriptionHelpFormatter,
)
parser.add_argument(
'--verbose',
help='show on standard error the path being built,\nand the names of files built, included and pasted'
)
args = parser.parse_args()
```
Then try running it in a suitably-sized terminal:
$ python3 test.py --help
usage: test.py [-h] [--verbose VERBOSE]
A simple templating system.
optional arguments:
-h, --help show this help message and exit
--verbose VERBOSE show on standard error the path being built, and the names of files built, included and pasted
Use `-' as a file name to indicate standard input or output.
```
The \n in the help for the `--verbose` argument is not respected. |
|
Date |
User |
Action |
Args |
2021-04-26 09:29:05 | rrt | set | recipients:
+ rrt |
2021-04-26 09:29:05 | rrt | set | messageid: <1619429345.55.0.132994171177.issue43942@roundup.psfhosted.org> |
2021-04-26 09:29:05 | rrt | link | issue43942 messages |
2021-04-26 09:29:05 | rrt | create | |
|