A Windows-only timed console input extension for Python.
Project description
betterInput
betterInput is a Windows-only Python package that provides a timed console input function implemented as a C extension.
Requirements
- Windows
- Python 3.9+
- Microsoft C++ Build Tools compatible with your Python version
Installation
pip install .
Usage
import betterInput
value, remaining, elapsed = betterInput.input(
prompt=">>> ",
timeout=10,
format="{prompt}{input} | %s",
countdown=0,
)
print(value, remaining, elapsed)
betterInput.input() returns a tuple:
(text, remaining_seconds, elapsed_seconds)when the user presses Enter(None, 0.0, timeout_seconds)when the timeout expires
Build
python -m pip install --upgrade build twine
python -m build
Local Test Install
pip install .
python -c "import betterInput; print(betterInput.input)"
Upload
twine check dist/*
twine upload dist/*
License
MIT
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 Distribution
betterinput-0.1.0.tar.gz
(4.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file betterinput-0.1.0.tar.gz.
File metadata
- Download URL: betterinput-0.1.0.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7972ab4f509947f3e81fa22ade67f6ffb3d0fb2681327958a5bf97262c59886d
|
|
| MD5 |
6500e350b7b41dae2b395ea7e46683cb
|
|
| BLAKE2b-256 |
7cb1501e28bf927e2c4d6e5d8dc596314c8c0ca24b65692bef89a64c27734a42
|
File details
Details for the file betterinput-0.1.0-cp314-cp314-win_amd64.whl.
File metadata
- Download URL: betterinput-0.1.0-cp314-cp314-win_amd64.whl
- Upload date:
- Size: 9.2 kB
- Tags: CPython 3.14, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cdb22e393111110daebd960c2fb35d39effdb2ee39391762c5a7e8598e182837
|
|
| MD5 |
43026da8a46a78d02c5222b8c2e29e1d
|
|
| BLAKE2b-256 |
b48585a3b0a34437eaf9a1b1ee115de68ff83991319dae719b126988b12d7254
|