BIOSUtilities v24.10.06

24.10.06

Changed BIOSUtility.parse_format() to return a boolean
Changed 7-Zip and EFI decompressors to return booleans
Apple EFI Package Extractor support for InstallAssistant
Apple EFI Image Identifier support for Apple ROM Version
Added Apple EFI Image Identifier class instance attributes
Improved flow of non-PATH external executable dependencies
Fixed crash when attempting to clear read-only attribute
Fixed incompatibility with Python versions prior to 3.12
Performance improvements when initializing BIOSUtilities
Improved argument naming and definitions of "main" script
Improved the README with new "main" and Apple EFI changes
This commit is contained in:
Plato Mavropoulos 2024-10-07 01:24:12 +03:00
parent 4175af9eb1
commit eda154b0f2
26 changed files with 346 additions and 223 deletions

View file

@ -30,17 +30,19 @@ def python_version() -> tuple:
def printer(message: str | list | tuple | None = None, padding: int = 0, new_line: bool = True,
pause: bool = False, sep_char: str = ' ') -> None:
""" Show message(s), controlling padding, newline, pausing & separator """
pause: bool = False, sep_char: str = ' ', strip: bool = False) -> None:
""" Show message(s), controlling padding, newline, stripping, pausing & separating """
message_string: str = to_string(in_object='' if message is None else message, sep_char=sep_char)
message_output: str = '\n' if new_line else ''
for line_index, line_text in enumerate(iterable=message_string.split('\n')):
line_newline: str = '' if line_index == 0 else '\n'
for message_line_index, message_line_text in enumerate(iterable=message_string.split('\n')):
line_new: str = '' if message_line_index == 0 else '\n'
message_output += f'{line_newline}{" " * padding}{line_text}'
line_text: str = message_line_text.strip() if strip else message_line_text
message_output += f'{line_new}{" " * padding}{line_text}'
if pause:
input(message_output)