"""Module to print neatly formatted tables and grids to the terminal."""from__future__importannotationsimportsysimportosimportshutil
[docs]defget_term_size()->os.terminal_size:""" Returns the terminal size. If it cannot be determined, for example because output is piped to a file, return :attr:`sys.maxsize` for width and height instead. :returns: (width, height). """returnshutil.get_terminal_size(fallback=(sys.maxsize,sys.maxsize))