New submission from Denilson Figueiredo de Sá <denilso...@gmail.com>:

Please add a function called "os.get_terminal_size()" that should return a 
tuple "(width, height)".

The built-in "argparse" module would directly benefit from this function, as it 
would wrap the help text correctly. I'm pretty sure many users would also 
benefit from it.

Once this function gets implemented, issue #13041 can be trivially fixed. There 
are some suggestions about how to implement this feature in issue #8408.

[extra feature:] After this function gets implemented, it might be a good idea 
to implement some kind of API to detect size changes without requiring probing. 
(or, at least, the documentation should give some directions about how to 
achieve it)

----------
components: Library (Lib)
messages: 149586
nosy: denilsonsa
priority: normal
severity: normal
status: open
title: Add "os.get_terminal_size()" function
type: enhancement

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue13609>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to