qmm.common module¶
-
qmm.common.command(binary, alias=False)[source]¶ Return path to binary or None if not found.
Analogous to bash’s command, but do not actually execute anything.
Parameters: - binary (str) – Name of binary to find in PATH
- alias (bool) – True if the name is an alias to be looked up the pre-made dict. alias is only useful for windows OS as the binary can be a tuple. Aliases are also used to find predefined software without the need of calling them by name, good for cross platform.
Returns: Path to the binary or None if not found.
Return type: os.Pathlike or None
-
qmm.common.settings= <qmm.config.Config object>¶ instance of the Config object that governs the user’s preferences. Can be imported anywhere in the app
-
qmm.common.settings_are_set()[source]¶ Returns False if either ‘local_repository’ or ‘game_folder’ isn’t set.
-
qmm.common.timestamp_to_string(timestamp)[source]¶ Takes a UNIX timestamp and return a vernacular date.
-
qmm.common.valid_suffixes(output_format='qfiledialog') → Union[List[str], Tuple[str, str, str], bool][source]¶ Properly format a list of filters for QFileDialog.
Parameters: output_format (str) – Accepts either ‘qfiledialog’ or ‘pathlib’. ‘pathlib’ returns a simple list of suffixes, whereas ‘qfiledialog’ format the output to be an acceptable filter for QFileDialog. Returns: a list of valid suffixes. Return type: list