A better input() for python
Project description
UpgradedInput
A better, minimal input() wrapper for python
Features compared to python's default input()
- Supports hooks for functions (Before and after input, on exception and on runtime error)
How to use
Install the module
pip install UpgradedInput
Use the module Example:
from UpgradedInput import UpgradedInput
# initialize
inp = UpgradedInput()
# Example of hooks (All of them can be left at the dafult state (None))
def before():
print("Before!")
def after():
print("After!")
def exception():
print("Exception!")
def runtime_error():
print("Runtime error!")
# Initialize the hooks
inp.before_input_function = before
inp.after_input_function = after
inp.exception_close_input_function = exception
inp.runtime_error_function = runtime_error
print(inp.input()) # final call to the wrapper
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
upgradedinput-0.0.4.tar.gz
(3.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 upgradedinput-0.0.4.tar.gz.
File metadata
- Download URL: upgradedinput-0.0.4.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4a1c78c14e203cb6289cf8148e8cfcf42ab131fd8e7ed5de66fc59c28d9c5f46
|
|
| MD5 |
69315b4d7462a00d5f8b4fcc90e9a6ad
|
|
| BLAKE2b-256 |
938a41c84519b482d7b6d69df6ae94bd94eb2ee460f9588c7520acbdab726152
|
File details
Details for the file upgradedinput-0.0.4-py3-none-any.whl.
File metadata
- Download URL: upgradedinput-0.0.4-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
86d2488f62a933470a5cd75952a9588da00ec458d0d839948436e17e6f044659
|
|
| MD5 |
13d7f2d7239381a2ee758dfdd04bc5fb
|
|
| BLAKE2b-256 |
f562456502771f23041f49c39b05779051dfe65c9fe90b38027421568a2b142b
|