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.0-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f50d02833a7e7866b9f42d62febbdf83c6703575240e9bbdd1446d09d70505d3 |
|
MD5 | 176b66791a61c935981fd17ec2ba5410 |
|
BLAKE2b-256 | 07fc5faaef1ec5921953cc7c87ff60a5af751769cb996caab828ceb21f13ee95 |
Hashes for windows_curses-2.4.0-cp312-cp312-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e165db84de30039f6da6bded9aa2f88e3c1ae7be11dc7c84416cbe6ba0ac4f29 |
|
MD5 | 468b33a1c68a65c4a7c66292674bcf9a |
|
BLAKE2b-256 | 86660a83825bd45f5cbd8dbeb7f96497e1162b355cbabd956b4960efceb04dc2 |
Hashes for windows_curses-2.4.0-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c32be4aa97887febff175a8a6b3deeecc06c1a3f47ecbb5f62de6bf4165d6db |
|
MD5 | 6a26108f8b10d99f7a04ed5e8da6d508 |
|
BLAKE2b-256 | ea7fe680c41be83302a40b2c9b45759e6105cf0e3afc5a0b67f8eb926ee478cc |
Hashes for windows_curses-2.4.0-cp311-cp311-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90fde3341b2361f45716cfbe44bd253ac6a07dfde7262f3afdcf7cc0285c35ac |
|
MD5 | 97f59eea8c5cf6932aa05418e6f0bf2c |
|
BLAKE2b-256 | 7691a24739ea1bd53ec0b4e05ba5c0c8f786715dfff1d6ce95bc8867f9677292 |
Hashes for windows_curses-2.4.0-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4621042a28f48e2240314a624eb36f18121483d47f12c488cad9670f402ba6d7 |
|
MD5 | 91364ed9e4d7b9361e9280dbba6e148e |
|
BLAKE2b-256 | 930c10e369eb0a6583890e1ebbb2e024040fde91299fbc167d5312ee18f138ae |
Hashes for windows_curses-2.4.0-cp310-cp310-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 525fa12689aa54cd8e4cfa6d03f3d4d336f2e9ef0b6db4fdb4d3c1b22a71180b |
|
MD5 | 0e8a940b21b97a4fe290fddeace9e641 |
|
BLAKE2b-256 | 4dd89f3740f6afe47bedec8f6dea6a8705215ebc0437e6feebd37d791d8be5d0 |
Hashes for windows_curses-2.4.0-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 441189fb71c455ed0575ffb1b840d5857c01c4dda441cbbbd34a6216e7207bfa |
|
MD5 | a6f869f1ca3d652e712c78a2375cd8da |
|
BLAKE2b-256 | 57ed03869584d15eccea26d45267d19a56ee82bfd6f65ebe989023e76fa81ad0 |
Hashes for windows_curses-2.4.0-cp39-cp39-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f481322360dbcdfa37b30654c89aa2920f4528eaefec3a50fa6a6d07be49069 |
|
MD5 | ccb04395d92ebbf00acb0cc1103924a7 |
|
BLAKE2b-256 | faebadad8bf163cc858aaa97f6063b67b056edf409ee8de74bd6c13282437d7e |
Hashes for windows_curses-2.4.0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c77973c5af419c3d9bcb99908dc9791102813026d6abdda9236e44d9342c9579 |
|
MD5 | 39aa58747e651759c76397a1999eeb81 |
|
BLAKE2b-256 | 753fe49501deeee0e641f68072ce44fca2668cdc99ab39a2b6e4ed9730dc46d2 |
Hashes for windows_curses-2.4.0-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 342b786c82fda5f9592593b2f8f4078de40b31baaf331be57af4c3c9a2e40061 |
|
MD5 | db167372c4d7381afc31227c1fc053aa |
|
BLAKE2b-256 | 210cbcc8a821e1ec1b93e5d6defaf69e3d3fbefc69ea4dd2aaea9f44c57496fa |
Hashes for windows_curses-2.4.0-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 68d633cdb7e82ec207184ab3be74c058e184cd34f76407801cf451be4ee85861 |
|
MD5 | 760359e8802020c3f4eb58723bc2c46e |
|
BLAKE2b-256 | b5fa6161ac3bb6aa9de09a3b7fedb8dbafb076325517e01220bf0d195f51d7f5 |
Hashes for windows_curses-2.4.0-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6771fb73f5a66d281a6f5e474dcfe07a4dd64460ff17c72ed9dd35fdf65fbfc8 |
|
MD5 | 262f63b77f12185ca6e99de252e69693 |
|
BLAKE2b-256 | 2d8907edb45c2a3f4eb53791a8e8b906498d5034c6e9ee3c0b61225579c10bfa |
Hashes for windows_curses-2.4.0-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e1f137d347e300e6163fa0aa31f7a02f6da42e43a90ce423bc929fb06752385e |
|
MD5 | c90d3d039c6dd96bf1efede9bec449ad |
|
BLAKE2b-256 | af22b246fa9d87d7456b6f6383779ddd2baaa7429ba8256c70551949705d9416 |
Hashes for windows_curses-2.4.0-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fcb0591fc6e647556f685327a6f3e6923afc8a16c35436665df692556b78e708 |
|
MD5 | e8f161bfb33216c3ade7a52747e16184 |
|
BLAKE2b-256 | 4814b51ff63f943f98589dc49fd9463ff78da95cc3b93d2a4e68c0ffa9f31c15 |