Antoine Pitrou <pit...@free.fr> 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.
I think we have reached the point where we won't be in total agreement over the API, so let's choose whatever is submitted as a patch. I only have two remaining issues with the patch: - the tests needn't be in a separate file, they can go in test_os - there should be a test for get_terminal_size_raw as well (and of course it should be skipped if the function doesn't exist) ---------- _______________________________________ 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