|
wtools
3.2.0-pre1
ESO waf tools
|
Functions | |
| def | get_wscript_frame () |
| List | getattr_as_list (object obj, str attr, *default=[]) |
| List[str] | getattr_as_list_extend (object obj, str attr, Union[List[str], str] values, *default=[]) |
| def | add_taskgen_method (tg, method, before='', after='') |
| def | merge_unique_items_to_list (base_list, merged_list) |
| def | merge_unique_items_to_dict (base_dict, merged_dict) |
| def | sanitize_bash_variable_name (variable_name) |
| def | check_project_naming_convention (name) |
Utility methods for wtools.
| def wtools.utils.add_taskgen_method | ( | tg, | |
| method, | |||
before = '', |
|||
after = '' |
|||
| ) |
Add `method` to taskgen with ordering constrains using `before` and `after`.
| def wtools.utils.check_project_naming_convention | ( | name | ) |
Checks if project naming convention is met for given name. If not ConfigurationError is raised. The valid project name should start with a letter and contain letters, numbers, hyphen "-" and underscore"_".
| List wtools.utils.getattr_as_list | ( | object | obj, |
| str | attr, | ||
| * | default = [] |
||
| ) |
Get attribute `attr` from obj as list`.
| List[str] wtools.utils.getattr_as_list_extend | ( | object | obj, |
| str | attr, | ||
| Union[List[str], str] | values, | ||
| * | default = [] |
||
| ) |
Extend attribute `attr` from obj as a list with additinal values.
| def wtools.utils.merge_unique_items_to_dict | ( | base_dict, | |
| merged_dict | |||
| ) |
Merge unique items from merged_dict to base_dict.
| def wtools.utils.merge_unique_items_to_list | ( | base_list, | |
| merged_list | |||
| ) |
Merge unique items from merged_list to base_list.
| def wtools.utils.sanitize_bash_variable_name | ( | variable_name | ) |
Adjust variable name to bash standard. If variable name consists '-' chars, they are converted to '_' char.