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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Hashes for windows_curses-2.4.0a5-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4300389cd49dc2805aa492beefe06ca8fa750136e90df5f0769c753de7276449 |
|
MD5 | 94406b71f5490ec94414bc490d740f17 |
|
BLAKE2b-256 | 365c50e649613ef616b8d27cd0cf0bab1de161635799a2a4a5a245aefd722b37 |
Hashes for windows_curses-2.4.0a5-cp312-cp312-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab51d31fb6f679e7df08e809644c6a796be18032648c4d654c8016e2ab477edd |
|
MD5 | a709c5f11d4f833bdd86ab5770037770 |
|
BLAKE2b-256 | 9b3b9d336a115bd2f0bf0bebd1343d98b23dc22a7975b0f064f9d3e11e91e8a9 |
Hashes for windows_curses-2.4.0a5-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c2de9ce3a0903d97288891dc7b7ab68725705e593857f9fb51e37d4376f6842 |
|
MD5 | 2987c1adf4493b2913c3748882169e91 |
|
BLAKE2b-256 | 4e32a4bffbcb8c27bad45d465c38b4a73384fd0d870404443f0783f764cdc3ee |
Hashes for windows_curses-2.4.0a5-cp311-cp311-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0417a17d1ea9d25800600a608ea6f6e0bdc0ff9697c87c0ebbff1d1243cccc09 |
|
MD5 | dad948b1f3a72b866fb0800cb34756f8 |
|
BLAKE2b-256 | c44268b923bdf92ad15138f4e76a1861410c20206b750307c61553fbda0168e7 |
Hashes for windows_curses-2.4.0a5-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 71d93d5fd5d507154648db1c5662577a84e7f8e2a8ffedc8da8d546a7dd0b0be |
|
MD5 | 1e49a63537ecd77fdeb24ce99a25157e |
|
BLAKE2b-256 | a09e68473a62169cc9e11c14dbbe1ce6fb68b6c6ac0df16e1fa8a95ba941416c |
Hashes for windows_curses-2.4.0a5-cp310-cp310-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b4dab546f238b6c78452c8ec772fb2e8c786cdfe241ceecc1759f7420e1ef43 |
|
MD5 | 1a25b96b5805f17563431073a12cb87e |
|
BLAKE2b-256 | 9f9ed02699574ae20af0d4c7825b0704a642c9c780099d4b46ee4ce372303010 |
Hashes for windows_curses-2.4.0a5-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d004514b76e9fd4df402b9f223632f7baa38f409374af530f17d1ef51c0d684 |
|
MD5 | 70a92f445a42b52d561a8b6a4ca7c3f9 |
|
BLAKE2b-256 | 3fb69e1b12a3c837630d70f1ce00b5ac520c977af07d624e7f67f73be96023bf |
Hashes for windows_curses-2.4.0a5-cp39-cp39-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3dae1f4e4378701668d8dcaef8df274df7bac53dbcbe9ac3a9311ac00b45a437 |
|
MD5 | 96863bd8431dd2f32c0a2c7ee122f984 |
|
BLAKE2b-256 | 1806e0299591b2b87f3ba887ab3d0d3f85822dbe29e03eae1b217d9f80c452c8 |
Hashes for windows_curses-2.4.0a5-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1cdc1cc8c0ecb58990b2672d8109456fd3dcd1076fa60fe8c07c75eef8ba510 |
|
MD5 | 52d76866e8d88ef503bd33b2356aeaeb |
|
BLAKE2b-256 | 807ada65f4aa70fea742705b53b42b88c3c9e39f3ce888a15de4ccdec797c0a4 |
Hashes for windows_curses-2.4.0a5-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8a159ddf60d9a26d3cce7d74a66beffae0617c2c8ff26cc84761c8ae81811976 |
|
MD5 | 4677cc9688197401f27666e90855c8bb |
|
BLAKE2b-256 | c33da7f3a04180b8803ede8883b2873d3b5a697647fb25450fd739a3402d2fb8 |
Hashes for windows_curses-2.4.0a5-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9dc95ba6402cd846a1ca36ca652a706b94fb13d9ca187c13eae629d657f6743f |
|
MD5 | 6ac1752f56b496ccae53c32c963dd02c |
|
BLAKE2b-256 | 25b79ab02e3de31a050d5f513f65a2bacd608dc33b9fd775f5c9e70c61cd0c54 |
Hashes for windows_curses-2.4.0a5-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32eacae8f99aad56a2fbac2f82cfd2aa8594149195a3b2d7227a2b1983a379c5 |
|
MD5 | 4b7a4fa6016280a3ce4d1bb94b553b4e |
|
BLAKE2b-256 | 2da85b872164efd1cddbd4ab4c3b7803b5898da10088ae17235624f710a8ac99 |
Hashes for windows_curses-2.4.0a5-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1e9a9b947eb86766ca18ae6fabf7599f7c068e783a3270c906d061f906928c8 |
|
MD5 | d83caabc73ff54166d959f4b6e5cf604 |
|
BLAKE2b-256 | b385061daa6cb7251a43b55f1d5c654d187a574f315ccb43990234d953af81fc |
Hashes for windows_curses-2.4.0a5-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f4ff6cb7010fafe7920a3d47a7cf0b0ff6c0be67957b4dfbd9b36314f9a8599 |
|
MD5 | 54de0c52a73774238207e87e14de6b04 |
|
BLAKE2b-256 | f242693b84af6aec0f632347e6c1b3011f7cacb988626840163e87ee9ce13f00 |