A simple helper lib with a few extra ways to get input from the user
import extra_input
option = extra_input.selector(["Option [1]","Option [2]"])
print(f"you selected {option}")select(options:list[str], squareBrackets = True) -> strSelects from a list of items, by defualt uses the items in the first square brackets of the listnumbered_select(options:list[str], use_parens = False, roman_numerals = False) -> strSelects from a list of items, selecting by using numbers not needed in the list Can use 1) or roman numeralsintput(text:str) -> intGets input and only allows intsfloat_input(text:str) -> floatGets input and only allows floatscustom_input(text:str, allowed:str, tellAllowed = True) -> strGets input only allowing the charecters in allowedget_int_range(prompt: str, min_val, max_val, tell_range) -> intGets an int in a certain rangeget_float_range(prompt: str, min_val, max_val, tell_range) -> floatGets a float in a certain rangeget_time(prompt: str, military_time = False) -> datetime.timeGets a datetime timeget_date(prompt: str, number_month = False, number_day = True) -> datetime.dateGets a datetime dateget_date_and_time(prompt: str, number_month = False, number_day = True, military_time = False) -> datetime.datetimeGets a datetime datetimeget_bool(prompt) -> boolGets a boolean value
If you want to do any of the three please use the github linked at the top
- 1.1.0:
- Added range based functions
- Added date and time functions
- Made sure to update the changelog
- Pretty sure I used correct grammar
- 1.0.6:
- Updated the readme
- 1.0.5:
- Fixed a bug where PyPI didn't show this whole readme
- 1.0.4:
- Fixed some misc bugs
- Fixed selector using the wrong index
- Fixed selector using its own charecter making it more error prone
- 1.0.0 - 1.0.3:
- Firguring out how to make this work