Curses for Win32?

Fredrik Lundh fredrik at pythonware.com
Wed Feb 21 18:12:24 EST 2001


Adam Lock wrote:
> I have a Python 2.0 program that uses Tkinter and curses for display. It
> works fine on Unix because there is a curses package but not on Win32
> because there isn't. Perversely even MacPython 2.0 has a curses package!
>
> Does anyone know if a curses package exists for Win32? I would even be
> happy if it compiled but didn't function since I want will be using the
> Tkinter UI anyway.

you only need the imports to work?

alternative 1: wrap the imports in try/except:

    try:
        import curses
    except ImportError:
        curses = None # let's hope nobody uses this

alternative 2: add python stub modules:

    > more curses.py
    # empty

if you decide that you want console output after all, you
could consider alternative 3: write a curses-compatible
wrapper for

    http://effbot.org/efflib/console

Cheers /F





More information about the Python-list mailing list