Skip to content

Commit

Permalink
feat: add test.py as a tool
Browse files Browse the repository at this point in the history
  • Loading branch information
mecaneer23 committed Apr 22, 2024
1 parent 3cc0b12 commit da301e5
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions tools/test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#!/usr/bin/env python3
"""Tester for acurses"""

# import curses
import src.acurses as curses

def _main(stdscr: curses.window):
curses.use_default_colors()
for i, color in enumerate(
[
curses.COLOR_RED,
curses.COLOR_GREEN,
curses.COLOR_YELLOW,
curses.COLOR_BLUE,
curses.COLOR_MAGENTA,
curses.COLOR_CYAN,
curses.COLOR_WHITE,
],
start=1,
):
curses.init_pair(i, color, -1)
# stdscr.box()
# stdscr.addstr(1, 1, "Hello, world!", curses.color_pair(6))
# win = curses.newwin(3, 7, 3, 3)
# win.addstr(1, 1, str(win._height))
# win.clear()
# stdscr.refresh()
# win.box()
# win.refresh()
# win.addstr(1, 1, "Bold text", color_pair(2))
# win.clear()
# stdscr.addstr(1, 1, "Bold text", color_pair(5) | A_STANDOUT)
while True:
x = stdscr.getch()
stdscr.addstr(str(x) + "\n")
if x == 27:
y = stdscr.getch()
stdscr.addstr(str(y) + ":")
if x == 113:
break
# stdscr.refresh()


if __name__ == "__main__":
curses.wrapper(_main)

0 comments on commit da301e5

Please sign in to comment.