Basic curses setup

This commit is contained in:
seem 2020-09-06 10:04:45 +02:00
parent c889203492
commit 1d810ee39b
2 changed files with 18 additions and 0 deletions

0
editor/__init__.py Normal file
View file

18
editor/main.py Normal file
View file

@ -0,0 +1,18 @@
import curses
def main() -> int:
return curses.wrapper(c_main)
def c_main(stdscr: "curses._CursesWindow") -> int:
while True:
# Update screen
stdscr.addstr(0, 0, "Hello world!")
# Handle keypresses
c = stdscr.getkey()
if c == "q":
break
return 0