This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author lucatrv
Recipients lucatrv
Date 2020-03-01.10:54:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1583060059.73.0.28112169594.issue39809@roundup.psfhosted.org>
In-reply-to
Content
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?
History
Date User Action Args
2020-03-01 10:54:19lucatrvsetrecipients: + lucatrv
2020-03-01 10:54:19lucatrvsetmessageid: <1583060059.73.0.28112169594.issue39809@roundup.psfhosted.org>
2020-03-01 10:54:19lucatrvlinkissue39809 messages
2020-03-01 10:54:19lucatrvcreate