Skip to main content

Python package - input_num is like input but it only accepts numbers

Project description

CodeFactor

input_num

Python package - input_num is like input but it only accepts numbers


Installation

  • Windows / macOS

    Run python3 -m pip install input_num

  • Linux

    Run python3 -m pip install input_num

Usage

  • Windows / macOS / Linux

    Add this to your script: import input_num input_num("Enter your age: ")

    ‎ Command scheme: input_num("Question: ", AllowNegativeNumbers, DoesPressingEnterReturnNothing)

    • First option: If you want to allow only positive numbers (numbers WITHOUT - at the begining), use input_num("Something", False). False just means Allow negative numbers = False And it is optional argument Default value is True

    • Second option: There is also second option, does pressing enter return "" ? Set it to False to make pressing enter ask you again. Example: input_num("Try pressing enter: ", True, False) - this allows negative numbers and disallows entering nothing. It is optional argument Default value is True

    ‎ ⚠️ If you want to set only second option, set the first option too ⚠️

    Do you want to be reminded to update the package? Run input_num.allow_update() RIGHT AFTER importing the package.

Uninstallation

  • Windows / macOS

    Run python3 -m pip uninstall input_num

  • Linux

    Run python3 -m pip uninstall input_num

FAQ

  • Question

    Answer

Do you like this? Hit that ⭐!
Use the star button as way to show us, that it works
Forks and pull requests are welcome of course

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

input_num-1.1.3.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

input_num-1.1.3-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file input_num-1.1.3.tar.gz.

File metadata

  • Download URL: input_num-1.1.3.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

File hashes

Hashes for input_num-1.1.3.tar.gz
Algorithm Hash digest
SHA256 41f24e7939c23bfde8ffb61bee86c317c6a97a93085434260c999414f7cc945b
MD5 0fba9805504c629275d9eff4066eaa03
BLAKE2b-256 1fd5ecfaa48c37abef5166d6dc4ff90ce26cd6edc703f7a46b32a4bc1e9e8765

See more details on using hashes here.

File details

Details for the file input_num-1.1.3-py3-none-any.whl.

File metadata

  • Download URL: input_num-1.1.3-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

File hashes

Hashes for input_num-1.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f97943d756404590dfed9ec38987c8b17509d5610425567c17d020728e9fc839
MD5 c590f22e88f643c7c82b8e2548a72b93
BLAKE2b-256 9658f52fb208998d3921ea4a7ce01c333d205366a60ebd518b942808f0dcda27

See more details on using hashes here.

Supported by

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