changeset 20 | 472a753664f9 |
child 110 | cf3d49cdd6e2 |
19:5e78d52ebb24 | 20:472a753664f9 |
---|---|
1 #!/usr/bin/python |
|
2 # coding=UTF-8 |
|
3 |
|
4 import curses |
|
5 import locale |
|
6 |
|
7 locale.setlocale(locale.LC_ALL, "") |
|
8 |
|
9 def doStuff(stdscr): |
|
10 message = "Press 'q' to quit.\n" |
|
11 stdscr.addstr(0, 0, message, 0) |
|
12 while True: |
|
13 c = stdscr.getkey() # pauses until a key's hit |
|
14 if c == 'q': |
|
15 break |
|
16 stdscr.addstr('%s %r\n' % (c, c)) |
|
17 |
|
18 curses.wrapper(doStuff) |