How to use the acquisition.tomviz.acquisition.vendors.passive.filesystem.Monitor function in Acquisition

To help you get started, we’ve selected a few Acquisition examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github OpenChemistry / tomviz / acquisition / tomviz / acquisition / vendors / passive / __init__.py View on Github external
extracted from fileNameRegex.
        :type fileNameRegexGroups: str
        :param groupRegexSubstitutions: A dictionary of lists. Keyed off the
        regex group names. The values are lists of dictionaries contains
        mappings of regex => repl using to replace parts of the captured group.
        For example {'n': '-'} - The will replace the 'n' with '-'.
        :type groupRegexSubstitutions: str
        """

        self._validate_connection_params(path, fileNameRegex,
                                         fileNameRegexGroups,
                                         groupRegexSubstitutions)
        self._filename_regex = fileNameRegex
        self._filename_regex_groups = fileNameRegexGroups
        self._group_regex_substitutions = groupRegexSubstitutions
        self._monitor = Monitor(path, filename_regex=fileNameRegex,
                                valid_file_check=_valid_file_check)
github OpenChemistry / tomviz / acquisition / tomviz / acquisition / vendors / passive / filesystem.py View on Github external
def __init__(self, path, filename_regex=None,
                 valid_file_check=lambda f: True):
        super(Monitor, self).__init__()
        self._path = path
        self._files = queue.Queue()
        self._filename_regex \
            = re.compile(filename_regex) if filename_regex else None
        self._listing = set()
        self._valid_file_check = valid_file_check