[issue13609] Add "os.get_terminal_size()" function

STINNER Victor report at bugs.python.org
Sat Jan 21 14:57:37 CET 2012


STINNER Victor <victor.stinner at haypocalc.com> added the comment:

> Does this need need more discussion, code review, testing,
> or just more time?

As I already wrote, I would prefer a very simple os.get_terminal_size() function: don't read environment varaiables, use a simple tuple instead of a new type, and raise an error if the size cannot be read (so no need of default values). The os module is written as a thin wrapper between Python and the OS. A more high level function (read environment variables, handle the error, use a namedtuple) can be written in your application, or maybe in another module.

This is just my opinion, other core developers may prefer your version :-)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13609>
_______________________________________


More information about the Python-bugs-list mailing list