pysys.utilsΒΆ

Utility functions and classes.

These functions are used by the rest of the PySys framework. In some cases you may wish to use these directly, however always check if there is a wrapper method in pysys.basetest.BaseTest (or pysys.baserunner.BaseRunner) that would do the job first, before resorting to these lower-level functions.

pysys.utils.allocport

Dynamic TCP port allocation.

pysys.utils.filediff

Comparing (diffing) text file contents.

pysys.utils.filegrep

Regular expression grep matching in text files.

pysys.utils.filereplace

Replacing tokens in a text file.

pysys.utils.fileunzip

Unpacking one or more compressed files.

pysys.utils.fileutils

File and directory handling utility functions such as mkdir and deletedir, with enhanced error handling and support for long paths on Windows.

pysys.utils.linecount

Counting the number of lines in a text file matching a specified regular expression.

pysys.utils.logutils

Log formatting classes that can be used or customized from the project configuration, including support for colored output on the console.

pysys.utils.misc

Miscellanous utilities such as pysys.utils.misc.compareVersions, pysys.utils.misc.setInstanceVariablesFromDict, and pysys.utils.misc.quoteString.

pysys.utils.perfreporter

Old module for performance reporter - deprecated in favour of pysys.perf.

pysys.utils.pycompat

Compatibility utilities for older Python versions.

pysys.utils.safeeval

Contains the safeEval function.

pysys.utils.threadutils

Contains the BackgroundThread class.