rows: Optional[str] = os.environ.get('LINES', None)
cols: Optional[str] = os.environ.get('COLUMNS', None)
if not rows or not cols:
+ logger.debug('Rows: %s, cols: %s, trying stty.', rows, cols)
try:
rows, cols = cmd(
"stty size",
cols = None
if rows is None:
+ logger.debug('Rows: %s, cols: %s, tput rows.', rows, cols)
try:
rows = cmd(
"tput rows",
rows = None
if cols is None:
+ logger.debug('Rows: %s, cols: %s, tput cols.', rows, cols)
try:
cols = cmd(
"tput cols",