This package allows program to get data iput of a specific type without giving errors
Project description
https://github.com/yoptgyo/get_input Author: Prashant Sengar Author email: prashantsengar5@hotmail.com
get_input
Python module to take input of a defined data type from user
How to use
import get_input
return_value = get_input.input(prompt, data_type)
Data types which can be used:
-'int' for integer -'str' for string
-'float' for float values
Example code
integer_value = get_input.input("Please enter a number: ", 'int')
>>> Please enter a number: hello
>>> Please enter an integer value.
>>> Please enter a number: 5.0
>>> Please enter an integer value.
>>> Please enter a number: 5
>>>
--It will ask the user to enter an integer value and will wait till an integer value is returned--
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
get_input-0.0.1.tar.gz
(1.5 kB
view hashes)
Built Distribution
Close
Hashes for get_input-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 061a839c3f4675ceb22b2addf5012b398bc717001c973d11d47c12e6f7ec9005 |
|
MD5 | f5af6769e5740e44f1548bf17962787e |
|
BLAKE2b-256 | 8129c94fd2d4d19fe5b9e884145be5b18794da6e73226b08500e2d39b552dac0 |