#!/usr/bin/python3 # =================================================================== # code based on: # askubuntu.com/questions/98181/how-to-get-screen-size-through-python-curses # =================================================================== import curses stdscr = curses.initscr() height,width = stdscr.getmaxyx() print(f'screen height={height}, width={width}') curses.endwin()