On Mon, 21 Jun 2021 16:35:31 +0100 Ray Kinsella <m...@ashroe.eu> wrote:
> +def get_terminal_rows(): > + '''Find the number of rows in the terminal''' > + > + rows, _ = os.popen('stty size', 'r').read().split() > + return int(rows) > + Use standard Python function os.get_terminal_size or shutil.get_terminal_size() instead. That way it would be portable to other OS.