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 paul.j3
Recipients lucatrv, paul.j3, rhettinger
Date 2020-03-02.22:04:30
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1583186670.2.0.910159011893.issue39809@roundup.psfhosted.org>
In-reply-to
Content
But you can replace the simple 'lambda' with a function that takes the max with 'columns'.  In other words, include: 

             width = _shutil.get_terminal_size().columns
             width -= 2
             width = min(max_text_width, width)

The only thing that the 'formatter_class' parameter requires is a callable that takes 'prog' as argument.  That can be a class, a subclass, a lambda or a function.
History
Date User Action Args
2020-03-02 22:04:30paul.j3setrecipients: + paul.j3, rhettinger, lucatrv
2020-03-02 22:04:30paul.j3setmessageid: <1583186670.2.0.910159011893.issue39809@roundup.psfhosted.org>
2020-03-02 22:04:30paul.j3linkissue39809 messages
2020-03-02 22:04:30paul.j3create