Message 151749 - Python tracker (original) (raw)

+1. I also find weird that a function, especially one living in the os module, has such a high level of abstraction (basically this is why I was originally proposing shutil module for this to go in).

Given the different opinions about the API, I think it's best to expose the lowest level functionality as-is, and let the user decide what to do (read env vars first, suppress the exception, use a fallback, etc.).

Fair enough, but other people expressed sympathy for the two-function approach :) I'm personally indifferent, although I find "get_terminal_size_raw" a bit ugly and liked "query_terminal_size" better.

(and looking up ROWS and COLUMNS make sense, since they are de facto standards)