Question

I'm a Python newbie.

I need something like Curses library for Python 2.6 or 3.1 to run on Windows and Linux without any code changes.

I need functions for colorizing text and background, for clearing screen, for reading key code without showing letter on screen and for moving text cursor to specidied position.

It must be completely free library.

When I try "import curses" on Windows, compiler says me "ImportError: No module named _curses" both on Python 2.6 and 3.1.

Was it helpful?

Solution

In case anyone out there is still looking for a curses solution on Windows, here is a site which has PDCurses-based builds of the standard Python curses module for Windows, and covers a pretty wide range: 32-bit and 64-bit, for Python versions 2.5, 2.6, 2.7, 3.1 and 3.2.

PDCurses is "a public domain curses library for DOS, OS/2, Win32, X11 and SDL".

OTHER TIPS

There is also urwid. http://excess.org/urwid/

See curses-like library for cross-platform console app in python which links to wcurses, a windows library that provides some amount of compatibility with ncurses.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top