Message363053
It is often desirable to limit the help text width, for instance to 78 or 88 columns, regardless of the actual size of the terminal window.
Currently you can achieve this in rather cumbersome ways, for instance by setting "os.environ['COLUMNS'] = '80'" (but this requires the "os" module, which may not be needed otherwise by your module, and may lead to other undesired effects), or by writing a custom formatting class. IMHO there should be a simpler option for such a basic task.
I propose to add a max_text_width parameter to ArgumentParser. This would require only minor code changes to argparse (see attached patch), should I open a pull request on GitHub? |
|
Date |
User |
Action |
Args |
2020-03-01 10:54:19 | lucatrv | set | recipients:
+ lucatrv |
2020-03-01 10:54:19 | lucatrv | set | messageid: <1583060059.73.0.28112169594.issue39809@roundup.psfhosted.org> |
2020-03-01 10:54:19 | lucatrv | link | issue39809 messages |
2020-03-01 10:54:19 | lucatrv | create | |
|