Add small interactive test scripts

This commit is contained in:
Joscha 2019-05-28 11:18:37 +00:00
parent 32bc9af2d8
commit 1803a6676e
4 changed files with 91 additions and 0 deletions

View file

@ -0,0 +1,20 @@
import urwid
import urwid.curses_display
import cheuph
from cheuph import AT, AttributedTextWidget
class TestWidget(urwid.WidgetWrap):
def __init__(self):
text = AT("Hello world!\nThis is some text.\nThird line.")
self.text = AttributedTextWidget(text)
self.filler = urwid.Filler(self.text)
super().__init__(self.filler)
def main():
screen = urwid.curses_display.Screen()
loop = urwid.MainLoop(TestWidget(), screen=screen)
loop.run()
main()