Skip to main content

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


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.2.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

upgradedinput-0.0.2-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file upgradedinput-0.0.2.tar.gz.

File metadata

  • Download URL: upgradedinput-0.0.2.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

Hashes for upgradedinput-0.0.2.tar.gz
Algorithm Hash digest
SHA256 82481d6c30ee7cfcc3b438c30198c4cd8e46ab62c0b75bc1c1ea5ea00dc8716c
MD5 258ab8614bf77ccaf3319ab720283ec9
BLAKE2b-256 45d868e41c82eb76930e3385645ef1b3dc4b4d1184c483ef8e6da1d4a7323dbe

See more details on using hashes here.

File details

Details for the file upgradedinput-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: upgradedinput-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for upgradedinput-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 bea9f96324b50e9c242350c952a6b7250ee5e03e2716aa46d2db5a163252dd1a
MD5 6f5007e99a1202461aa129d44a8d6c4d
BLAKE2b-256 f7100c97516f51ac89ebbdd06408c330926f8e4a5bc3dd465c2398a11c40f0b0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page