paul j3 <[email protected]> added the comment:
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.
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue39809>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com