Jun-14-2019, 03:42 AM
Not sure about a module but you could make something easily.
Bash typically has 80 columns, but that and the number of lines can change. If you want to center the text you can ask bash the columns and rows of the current window.
Use subprocess.check_output to run a shell command and return the output as a string.
tput lines and tput cols are the terminal commands that should tell you the height and width respectively.
Then just split your space based on the length of your strings.
Bash typically has 80 columns, but that and the number of lines can change. If you want to center the text you can ask bash the columns and rows of the current window.
Use subprocess.check_output to run a shell command and return the output as a string.
tput lines and tput cols are the terminal commands that should tell you the height and width respectively.
Then just split your space based on the length of your strings.