From 1cbb32779b73506186e60335ced31b295ddc8c58 Mon Sep 17 00:00:00 2001 From: Tanner Collin Date: Thu, 1 Sep 2022 01:33:26 -0600 Subject: [PATCH] Add simple curses example --- simple.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 simple.py diff --git a/simple.py b/simple.py new file mode 100755 index 0000000..f3ff77d --- /dev/null +++ b/simple.py @@ -0,0 +1,19 @@ +#!/home/pi/protovac/env/bin/python + +import time +import curses + +stdscr = curses.initscr() +curses.noecho() +curses.cbreak() +stdscr.keypad(True) + +stdscr.addstr(5, 5, 'Hello world!') +stdscr.refresh() + +stdscr.getch() + +curses.nocbreak() +stdscr.keypad(False) +curses.echo() +curses.endwin()