PyDocs

Nav

Generic Operating System Services

get_terminal_size

os

functionUnixWindows
  • get_terminal_size(fd=STDOUT_FILENO, /)
Return the size of the terminal window as (columns, lines).

The optional argument fd (default standard output) specifies
which file descriptor should be queried.

If the file descriptor is not connected to a terminal, an OSError
is thrown.

This function will only be defined if an implementation is
available for this system.

shutil.get_terminal_size is the high-level function which should
normally be used, os.get_terminal_size is the low-level implementation.
0 Examples
No examples for os/get_terminal_size.
See Also
No see-alsos for os/get_terminal_size
0 Notes
No notes for get_terminal_size