tests/unicode.py
author Radek Brich <radek.brich@devl.cz>
Fri, 07 Oct 2011 12:02:33 +0200
changeset 19 5e78d52ebb24
permissions -rwxr-xr-x
Update demos and tests.

#!/usr/bin/python
# coding=UTF-8

import curses
import locale

locale.setlocale(locale.LC_ALL, "")

def doStuff(stdscr):
  message = "Žlutý kůň.\nPress 'q' to quit.\n"
  stdscr.addstr(0, 0, message, 0)
  while True:
    c = stdscr.getch() # pauses until a key's hit
    if c == ord('q'):
      break
    stdscr.addch(c)

curses.wrapper(doStuff)