hyperx.utils.utils

Utility methods.

def Open(hdbPath: os.PathLike) -> hyperx.api.Application:

Opens a HyperX database for script access.

@contextmanager
def OpenManagedDatabase( hdbPath: os.PathLike) -> Generator[hyperx.api.Application, NoneType, NoneType]:

Opens a HyperX database for script access in with statement context managers.

def OpenWithDefault(filepath: str):

Opens a file in the default application for its file extension.

def CallExternalProcess(cmd) -> str:

Calls an external process and returns stdout as a string.

def WriteCsv( data: list[list[typing.Any]], headers: list[str], title: str, outputDir: str) -> str:

Write tabular data to a csv file. Returns the path that the file was written to.

def ScrubFileName(filename: str) -> str:

Removes invalid characters from a windows file name.

def RemoveCharacters(s: str, chars: str) -> str:

Removes a set of characters from a string.