Skip to main content

Support for the standard curses module on Windows

Project description

Adds support for the standard Python curses module on Windows. Based on these wheels. Uses the PDCurses curses implementation.

The wheels are built from this GitHub repository.

PDCurses is compiled with wide character support, meaning get_wch() is available. UTF-8 is forced as the encoding.

Starting from windows-curses 2.0, in the name of pragmatism, these wheels (but not Gohlke's) include a hack to make resizing work for applications developed against ncurses without Python code changes: Whenever getch(), getkey(), or get_wch() return KEY_RESIZE, resize_term(0, 0) is called automatically. This gives behavior similar to the automatic SIGWINCH handling in ncurses (see PDCurses' resize_term() documentation). This commit implements the hack.

To add the same hack in Python code (which is harmless, and needed if you want resizing to work with older windows-curses versions or with Gohlke's wheels), call curses.resize_term(0, 0) after receiving KEY_RESIZE, and ignore any curses.error exceptions. ncurses reliably fails and does nothing for resize_term(0, 0), so this is safe on *nix.

Please tell me if the resize_term(0, 0) hackery causes you any trouble.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

windows_curses-2.4.0a5-cp312-cp312-win_amd64.whl (81.8 kB view hashes)

Uploaded CPython 3.12 Windows x86-64

windows_curses-2.4.0a5-cp312-cp312-win32.whl (71.4 kB view hashes)

Uploaded CPython 3.12 Windows x86

windows_curses-2.4.0a5-cp311-cp311-win_amd64.whl (81.5 kB view hashes)

Uploaded CPython 3.11 Windows x86-64

windows_curses-2.4.0a5-cp311-cp311-win32.whl (71.2 kB view hashes)

Uploaded CPython 3.11 Windows x86

windows_curses-2.4.0a5-cp310-cp310-win_amd64.whl (81.5 kB view hashes)

Uploaded CPython 3.10 Windows x86-64

windows_curses-2.4.0a5-cp310-cp310-win32.whl (71.2 kB view hashes)

Uploaded CPython 3.10 Windows x86

windows_curses-2.4.0a5-cp39-cp39-win_amd64.whl (89.6 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

windows_curses-2.4.0a5-cp39-cp39-win32.whl (76.9 kB view hashes)

Uploaded CPython 3.9 Windows x86

windows_curses-2.4.0a5-cp38-cp38-win_amd64.whl (89.4 kB view hashes)

Uploaded CPython 3.8 Windows x86-64

windows_curses-2.4.0a5-cp38-cp38-win32.whl (76.5 kB view hashes)

Uploaded CPython 3.8 Windows x86

windows_curses-2.4.0a5-cp37-cp37m-win_amd64.whl (70.8 kB view hashes)

Uploaded CPython 3.7m Windows x86-64

windows_curses-2.4.0a5-cp37-cp37m-win32.whl (61.7 kB view hashes)

Uploaded CPython 3.7m Windows x86

windows_curses-2.4.0a5-cp36-cp36m-win_amd64.whl (70.8 kB view hashes)

Uploaded CPython 3.6m Windows x86-64

windows_curses-2.4.0a5-cp36-cp36m-win32.whl (61.7 kB view hashes)

Uploaded CPython 3.6m Windows x86

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page