|
BonPrinter v1.2.0
Thermal Printer tool
|
Classes | |
| class | Config |
| Class Configuration: Read/Write configuration data (user or articles) More... | |
Functions | |
| float | get_dict_float (dict[str, dict[str, str]] d_dict, str s_section, str s_key) |
| Get floating value in dictionary. | |
| int | get_dict_int (dict[str, dict[str, str]] d_dict, str s_section, str s_key) |
| Get integer value in dictionary. | |
| str | get_dict_value (dict[str, dict[str, str]] d_dict, str s_section, str s_key) |
| Get value from dictionary. | |
| bool | is_float (Any value) |
| Check if string can convert to float. | |
| bool | is_int (Any value) |
| Check if string can convert to integer. | |
| dict[str, dict[str, str|list[str]]] | read_data_from_config_file (str s_file_name) |
| Read data from configuration file. | |
| dict[str, Any] | sort_dict (dict[str, Any] d_dict_to_sort, dict[str, Any] d_order_reference) |
| Sort dictionary. | |
| None | write_config_to_file (str s_file_name, dict[str, Any] d_dict) |
| Write configuration to file. | |
Variables | |
| log = logging.getLogger(__title__) | |
| str | S_ITEM_FILE = "articles.ini" |
| str | S_ITEM_TEMP_FILE = "_temp_articles.ini" |
| str | S_USER_FILE = "user.ini" |
| str | S_USER_TEMP_FILE = "_temp_user.ini" |
| float get_dict_float | ( | dict[str, dict[str, str]] | d_dict, |
| str | s_section, | ||
| str | s_key ) |
Get floating value in dictionary.
| d_dict | : dictionary |
| s_section | : section |
| s_key | : key |
Definition at line 62 of file config.py.
| int get_dict_int | ( | dict[str, dict[str, str]] | d_dict, |
| str | s_section, | ||
| str | s_key ) |
Get integer value in dictionary.
| d_dict | : dictionary |
| s_section | : section |
| s_key | : key |
Definition at line 79 of file config.py.
| str get_dict_value | ( | dict[str, dict[str, str]] | d_dict, |
| str | s_section, | ||
| str | s_key ) |
Get value from dictionary.
| d_dict | : dictionary |
| s_section | : section |
| s_key | : key |
Definition at line 96 of file config.py.
| bool is_float | ( | Any | value | ) |
Check if string can convert to float.
| value | : value to check |
Definition at line 34 of file config.py.
| bool is_int | ( | Any | value | ) |
Check if string can convert to integer.
| value | : value to check |
Definition at line 48 of file config.py.
| dict[str, dict[str, str | list[str]]] read_data_from_config_file | ( | str | s_file_name | ) |
Read data from configuration file.
| s_file_name | : file to read |
Definition at line 484 of file config.py.
| dict[str, Any] sort_dict | ( | dict[str, Any] | d_dict_to_sort, |
| dict[str, Any] | d_order_reference ) |
Sort dictionary.
| d_dict_to_sort | : dictionary to sort |
| d_order_reference | : reference dictionary to sort in this order |
Definition at line 453 of file config.py.
| None write_config_to_file | ( | str | s_file_name, |
| dict[str, Any] | d_dict ) |
Write configuration to file.
| s_file_name | : write to this file |
| d_dict | : dictionary to write |
Definition at line 507 of file config.py.