Urwid - Console User Interface Library

Urwid is a console user interface library for Python. Urwid is released under the GNU Lesser General Public License and it includes many features useful for text console application developers:

  • Fluid interface resizing (xterm window resizing / fbset on Linux console)
  • Web application display mode using Apache and CGI [ Live Demo ]
  • Support for UTF-8, simple 8-bit and CJK encodings
  • Multiple text alignment and wrapping modes built-in
  • Ability create user-defined text layout classes
  • Simple markup for setting text attributes
  • Powerful list box that handles scrolling between different widget types
  • List box contents may be managed with a user-defined class
  • Flexible edit box for editing many different types of text
  • Buttons, check boxes and radio boxes
  • Customizable layout for all widgets
  • Easy interface for creating HTML screen shots

Starting Points

System Requirements

  • Python 2.3 or higher
  • Linux, OSX, Cygwin or other unix-like operating system
  • (optional) ncurses library to use the curses_display module
  • (optional) Apache 1.3 or higher to use the web_display module

Supported Encodings

Urwid supports the following character encodings:

  • UTF-8 (narrow and wide characters)
  • ISO-8859-*
  • EUC-JP (JISX 0208 only)
  • EUC-KR
  • EUC-CN (aka CN-GB)
  • EUC-TW (CNS 11643 plain 1 only)
  • GB2312
  • GBK
  • BIG5
  • UHC

Known Issues

  • UTF-8 is not supported in the default version of ncurses. Use the raw_display module instead of curses_display for UTF-8 support.
  • In Mac OSX's Terminal.app Home, End, Page Up, Page Down are reserved for scrollback. Also, Terminal.app thinks it is monochrome, but setting TERM=xterm-color will fix that.