if you require a special datatyp from input()
Project description
The modul "inputhandler" provides the function
dinput(output = 'Please enter an integer: ', sinput = 'Illegal input, try again.',
datatyp = int, ranges = False, lowerlimit = 0, upperlimit = 100,
rsinput = "Integer does not lie between 0, 100: " ):
for example:
>>>a = dinput()
>>>Please enter an integer: sd
Illegal input, try again.
>>>Please enter an integer: 43
>>> a
43
>>>a = dinput(ranges = True)
>>>Please enter an integer: sd
Illegal input, try again.
>>>Please enter an integer: 477
Integer does not lie between 0, 100
>>>Please enter an integer: 100
>>>a
100
If there are some bugs, please send me an email: masatamara@gmail.com
dinput(output = 'Please enter an integer: ', sinput = 'Illegal input, try again.',
datatyp = int, ranges = False, lowerlimit = 0, upperlimit = 100,
rsinput = "Integer does not lie between 0, 100: " ):
for example:
>>>a = dinput()
>>>Please enter an integer: sd
Illegal input, try again.
>>>Please enter an integer: 43
>>> a
43
>>>a = dinput(ranges = True)
>>>Please enter an integer: sd
Illegal input, try again.
>>>Please enter an integer: 477
Integer does not lie between 0, 100
>>>Please enter an integer: 100
>>>a
100
If there are some bugs, please send me an email: masatamara@gmail.com
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
inputhandler-1.0.1.zip
(1.4 kB
view details)
File details
Details for the file inputhandler-1.0.1.zip
.
File metadata
- Download URL: inputhandler-1.0.1.zip
- Upload date:
- Size: 1.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
58b68794b37af6786e0e03fa4c2908e399a694cc5c72dc44e66c864c137d8a73
|
|
MD5 |
6a63c5ade15514f756a1cb3557548d59
|
|
BLAKE2b-256 |
d74ef3db08d780e3dffa1603d6102e665f14b01c64e02abddbe1337cbf2a2595
|