def _height_and_width(self):
<EOL>if GTS_SUPPORTED:<EOL><INDENT>return os.get_terminal_size(self.stream_fd)<EOL><DEDENT>window = get_csbi(self.stream_fh).srWindow<EOL>return TerminalSize(window.Right - window.Left + <NUM_LIT:1>, window.Bottom - window.Top + <NUM_LIT:1>)<EOL>
Query console for dimensions
Returns named tuple (columns, lines)