Skip to main content

Convenient function set

Project description

LassaLib

Convenient function set

Author:

License:

  • GNU General Public License v3.0

Version:

  • 3.1.2

Summary


Links


Methods

  • detailed_object

    Shows information about an object.

    Parameters:

    • value (Any) : A value of any type or class.
    • detailed (bool) : Should the function send detailed content?
    • __tab_number (int) : The default number of tabs to put in front of the printout.
  • display_iterable

    Displays iterables in a human-readable way.

    Parameters:

    • iterable (list or tuple or set or dict) : An iterable.
    • __tab_number (int) : The default number of tabs to put in front of the printout.

    Return:

    • None : Print the iterable to the console
  • enter

    This function allows to input any type.

    Parameters:

    • __prompt (str) : Text to print before recovery.
    • __tab_number (int) : The default number of tabs to put in front of the printout.

    Raise:

    • TypeError : If __type is not in return type.

    Return:

    • bool or complex or float or int or list or set or slice or str : Print the iterable to the console
  • last_iteration

    Return the index of the last iteration on list.

    Parameters:

    • list_of_think (str/list/tuple) : The searched iteration.
    • obj (Any) : The object to search in.

    Return:

    • int : The index of last iteration.
  • menu

    Create a menu.

    Parameters:

    • choices (list) : The liste of choice.
    • title (str) : Title of menu.
    • desc (str) : Description of menu.
    • prompt (str) : The prompt before choice.
    • can_back (bool) : The menu displays the choice of return at 0)?
    • name_back (str) : Name of back.

    Return:

    • int: The index of choice with 'Back' in index 0 and other index + 1.
  • position

    Push in the position the text with correct length.

    Parameters:

    • pos (str) : left, center or right.
    • txt (str) : The text to move.
    • length (int) : The length of the final string.
    • fill (str) : String filler.

    Return:

    • str : The string filled.
  • replace_last

    Replaces the last iteration of the substring entered with the string chosen in the quoted string.

    Parameters:

    • sub_string (str) : The substring entered.
    • new_string (str) : The string chosen.
    • string (str) : The quoted string.

    Return:

    • str : The quoted string with the last iteration of the substring replaced by the chosen string.
  • space_number

    Separate with character defines the number entered every 3 digits.

    Parameters:

    • number (int, float) : A value.
    • separator (str) : A character.

    Return:

    • str : A string of number separate.

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

lassalib-3.1.2.tar.gz (19.2 kB view hashes)

Uploaded Source

Built Distribution

lassalib-3.1.2-py3-none-any.whl (19.4 kB view hashes)

Uploaded Python 3

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