Add simple curses example
This commit is contained in:
parent
bf643cfa1d
commit
1cbb32779b
19
simple.py
Executable file
19
simple.py
Executable file
|
@ -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()
|
Loading…
Reference in New Issue
Block a user