rename class TUI to App, change StdOutWrapper to a context manager and add idea of a main_loop() for the App class
This commit is contained in:
@@ -15,7 +15,7 @@ import curses
|
||||
import locale
|
||||
from pylib.data import seq
|
||||
from pylib.function import sine_wave, cosine_wave, hypotrochoid, to_str
|
||||
from pylib.tui import TUI
|
||||
from pylib.tui import App
|
||||
|
||||
locale.setlocale(locale.LC_ALL, '')
|
||||
CODE = locale.getpreferredencoding()
|
||||
@@ -115,7 +115,7 @@ def main(delay=1):
|
||||
"""
|
||||
no window change for mouse events and resize events.
|
||||
"""
|
||||
tui = TUI(delay)
|
||||
tui = App(delay)
|
||||
initscr = tui.initscr
|
||||
try:
|
||||
tui.last_pressed_ch = 0 # getch() Note that the integer returned does not have to be in ASCII range: function keys, keypad keys and so on return numbers higher than 256.
|
||||
|
||||
Reference in New Issue
Block a user