Use shutil.get_terminal_size for getting the terminal width if it's available (python...