I received a suggestion that might help with Getting the amount of available lines in a terminal.
Here was the suggestion:
I am familiar with the function os.environ.get()
(from How do I access environment variables from Python?)
The problem is that I do not understand what environment variables LINES
and ROWS
refer to.
Is this a preexisting variable on some consoles, or would I need to always set them myself?
Here is what I tried in my console:
>>> import os
>>> print(os.environ.get('LINES'))
None
>>> print(os.environ.get('ROWS'))
None
>>>
So it is clear in my Windows terminal at least they are not set.
I am also unsure what they do and even if they exist since I could not find anything about either of them.