Development Status
- 4 - Beta
Environment
- Console :: Curses
- Win32 (MS Windows)
License
- OSI Approved :: Python Software Foundation License
Operating System
- Microsoft :: Windows
Programming Language
- C
- Python
- Python :: 3.6
- Python :: 3.7
- Python :: 3.8
- Python :: 3.9
- Python :: 3.10
- Python :: 3.11
- Python :: 3.12
- Python :: 3.13
- Python :: Implementation :: CPython
Topic
- Software Development
- Software Development :: Libraries :: Python Modules
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.
Wheel compatibility matrix
| Platform | CPython 3.6 | CPython 3.7 | CPython 3.8 | CPython 3.9 | CPython 3.10 | CPython 3.11 | CPython 3.12 | CPython 3.13 |
|---|---|---|---|---|---|---|---|---|
| win32 | ||||||||
| win_amd64 |