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.main 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.3.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.3.tar.gz.
File metadata
- Download URL: upgradedinput-0.0.3.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 |
158994a57ef3b892b315981c3234db5b831d1315c670a49ace511a422b26207e
|
|
| MD5 |
57c96ec0aa230d582dc74f784696db00
|
|
| BLAKE2b-256 |
9c8cf19999ded769a2bced99097b3e1d0cb83ce96cb8e1cd409fcdc09bed6c54
|
File details
Details for the file upgradedinput-0.0.3-py3-none-any.whl.
File metadata
- Download URL: upgradedinput-0.0.3-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 |
2dbdc7c327d4b7107217063a4065109dabd62e8eb3ec1ea0fed41508a2612073
|
|
| MD5 |
4269540091aebc9b35413d195aa188e3
|
|
| BLAKE2b-256 |
66a00b3e2c7a55c374ce309601ac123f94008fb58692f8f37440edae34d88b4d
|