#!/usr/bin/python3
# ===================================================================
# code based on:
# askubuntu.com/questions/98181/how-to-get-screen-size-through-python-curses
# ===================================================================
import curses
from curses import wrapper
def main(stdscr):
##stdscr = curses.initscr()
stdscr.refresh()
height,width = stdscr.getmaxyx()
print(f'screen height={height}, width={width}')
stdscr.getch() # wait for user to press and key
##curses.endwin()
# -------------------------------------------------------------------
# ---- main
# -------------------------------------------------------------------
wrapper(main)