sdlterm/demo.py
changeset 72 6e0656600754
parent 71 cfd3445107b4
child 73 85a282b5e4fc
equal deleted inserted replaced
71:cfd3445107b4 72:6e0656600754
     1 #!/usr/bin/env python3
       
     2 # -*- coding: utf-8 -*-
       
     3 
       
     4 from sdlterm import SDLTerminal
       
     5 
       
     6 if __name__ == '__main__':
       
     7     term = SDLTerminal()
       
     8     term.resize(800, 600)
       
     9     term.select_font(b"font/DejaVuSansMono.ttf", b"font/DejaVuSansMono-Bold.ttf", 12)
       
    10     term.erase()
       
    11     term.putch(5, 5, 'W')
       
    12     term.commit()
       
    13 
       
    14     while True:
       
    15         event = term.wait_event()
       
    16         print(event)
       
    17         if event[0] == 'keypress' and event[1] == 'escape':
       
    18             break
       
    19