http://www.amk.ca/python/howto/curses/curses.html#SECTION000210000000000000000