I'm working on a python app and try to write the -help page of the script to show all its actions on the terminal when calling it with thie -h
or -help
option. The head should look something like this :
==================================== help page ====================================
However, I find myself unable to do that because I don't have control of the terminal width, so I can't predict the number of '=' characters to put between these words to make the rendered line symmetrical.So I wanna know if there is a way to pick the size of the terminal screen, then adjust the number of spaces based on that size.
I tried looking for functions that raise the terminal size but didn't find any.