python how to check what terminal size is code example Example: python console width import os rows, columns = os.popen('stty size', 'r').read().split()