Convenient function set.
Project description
LassaLib
Convenient function set.
Python library by LassaInora.
Summary
- Links
- Contacts
- Methods
- enter(__prompt: str = '', __type: type = int) -> typing.Any
- last_iteration(iteration_text: str, txt: str) -> int | None
- menu(choices: list, prompt: str, can_back: bool, title: str, desc: str = None) -> int
- position(pos: str, txt: str, length: int, fill: str) -> str
- replace_last(sub_string: str, new_string: str, string: str) -> str
- show_value(value: typing.Any, tab_number: int = 0) -> None
- space_number(number: typing.Union[int, float], spacing: str = ' ') -> str
- str_object(obj: typing.Any) -> str
Links
Contacts
Methods:
enter(__prompt: str = '', __type: type = int) -> typing.Any
- This function allows to input any type.
- __prompt (str) : Text to print before recovery.
- __type (type) : The type to recover.
- Can return:
- Any type.
last_iteration(iteration_text: str, txt: str | list) -> int | None
- Return the index of the last iteration on string.
- iteration_text (str) : The searched iteration
- txt (str or list) : The variable to search in.
- Can return:
- int
- None
- Create a menu with the list of choices.
- choices (list) : The liste of choice.
- prompt (str) : The prompt before choice.
- can_back (bool) : Menu affiche back choice at 0)?
- title (str) : Title of menu.
- desc (str) : Description of menu.
- Can return:
- int
position(pos: str, txt: str, length: int, fill: str) -> str
- Push in the position the text with correct length.
- pos (str) : The position where push
- txt (str) : The text to push.
- length (int) : The length of final string.
- fill (str) : The character with fill the string.
- Can return:
- str
replace_last(sub_string: str, new_string: str, string: str) -> str
- Replaces the last iteration of the substring entered with the string chosen in the quoted string.
- sub_string (str) : The substring entered.
- new_string (str) : The string chosen.
- string (str) : The quoted string.
- Can return:
- str
show_value(value: typing.Any, tab_number: int = 0) -> None
- Prints in the terminal all the elements of a list, a dictionary or a tuple and its sub-elements.
Prints in the terminal the other types and class.- value (Any) : A value of any type or class.
- tab_number (int) : The default number of tabs to put in front of the printout.
- Can return:
- None
space_number(number: typing.Union[int, float], spacing: str = ' ') -> str
- Separate with character defines the number entered every 3 digits.
- number (int or float) : A value.
- spacing (str) : A character.
- Can return:
- str
str_object(obj: typing.Any) -> str
- Create a string of all info about an object regardless of its class.
- obj (Any) : An object from Any type or class.
- Can return:
- str
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
LassaLib-2.1.0.tar.gz
(18.1 kB
view hashes)
Built Distribution
LassaLib-2.1.0-py3-none-any.whl
(18.3 kB
view hashes)