How can the amount of available lines in a terminal be found?
Preferably in a cross-platform manner but any suggestions (even OS-specific) are welcome.
The height and length of a terminal can be found using the os
module however this does not take into account the amount of lines that may already have been used.
To clarify things here is an example:
In this example the height of the terminal here is 33 however since 3 lines have been used, only 30 lines are available.