def __init__(self,
                 exit,
                 target,
                 interpreter,
                 archive,
                 passthrough,
                 rmtree,
                 loop=None,
                 **kwargs):
        self._exit = exit

        self._archive = archive
        self._target = target
        self._passthrough = passthrough
        self._rmtree = rmtree
        self._interpreter = interpreter

        patterns = kwargs['patterns'] if 'patterns' in kwargs else []
        patterns.append('input')
        kwargs['patterns'] = patterns

        logging.info('Patterns: %s' % str(kwargs['patterns']))

        AIOEventHandler.__init__(self, loop)
        PatternMatchingEventHandler.__init__(self, **kwargs)

        if os.path.exists(input_directory):
            asyncio. async (self.execute(input_directory))
Exemple #2
0
    def __init__(self, module, *, debug=True):
        AIOEventHandler.__init__(self)
        self.parent_path = module.__path__
        self.parend_path_lib = pathlib.Path(module.__path__[-1])
        self.parent_name = module.__name__
        self.modules = deque()
        self.debug = debug

        if self.debug:
            logger.debug(f"watching changes on module: {self.parent_name}")
    def __init__(self, exit, input_directory, output_directory, output_directory_tmp, loop=None, **kwargs):
        self._exit = exit
        self._loop = loop
        self._input_directory = input_directory
        self._output_directory = (output_directory_tmp, output_directory)

        logging.info('From directory is ' + input_directory)
        logging.info('To directory is ' + output_directory)

        AIOEventHandler.__init__(self, loop)
        FileSystemEventHandler.__init__(self, **kwargs)
Exemple #4
0
    def __init__(self, exit, magic_script_pattern, loop=None, **kwargs):
        self._exit = exit

        script_location = os.path.join(input_directory, magic_script_pattern)

        patterns = kwargs['patterns'] if 'patterns' in kwargs else []
        patterns.append(script_location)
        kwargs['patterns'] = patterns

        logging.info('Patterns: %s' % str(kwargs['patterns']))

        AIOEventHandler.__init__(self, loop)
        PatternMatchingEventHandler.__init__(self, **kwargs)

        if os.path.exists(script_location):
            self._loop.call_soon_threadsafe(
                asyncio. async,
                self.handle_exists(script_location,
                                   os.path.isdir(script_location)))
Exemple #5
0
    def __init__(self, exit, magic_script_pattern, loop=None, **kwargs):
        self._exit = exit

        script_location = os.path.join(input_directory, magic_script_pattern)

        patterns = kwargs['patterns'] if 'patterns' in kwargs else []
        patterns.append(script_location)
        kwargs['patterns'] = patterns

        logging.info('Patterns: %s' % str(kwargs['patterns']))

        AIOEventHandler.__init__(self, loop)
        PatternMatchingEventHandler.__init__(self, **kwargs)

        if os.path.exists(script_location):
            self._loop.call_soon_threadsafe(
                asyncio.async,
                self.handle_exists(script_location, os.path.isdir(script_location))
            )
    def __init__(self, exit, target, interpreter, archive, passthrough, rmtree, loop=None, **kwargs):
        self._exit = exit

        self._archive = archive
        self._target = target
        self._passthrough = passthrough
        self._rmtree = rmtree
        self._interpreter = interpreter

        patterns = kwargs["patterns"] if "patterns" in kwargs else []
        patterns.append("input")
        kwargs["patterns"] = patterns

        logging.info("Patterns: %s" % str(kwargs["patterns"]))

        AIOEventHandler.__init__(self, loop)
        PatternMatchingEventHandler.__init__(self, **kwargs)

        if os.path.exists(input_directory):
            asyncio.async(self.execute(input_directory))
Exemple #7
0
    def __init__(self, lock, loop=None, **kwargs):
        self._lock = lock

        AIOEventHandler.__init__(self, loop)
        FileSystemEventHandler.__init__(self, **kwargs)
Exemple #8
0
 def __init__(self, loop=None):
     AIOEventHandler.__init__(self, loop=loop)
Exemple #9
0
    def __init__(self, lock, loop=None, **kwargs):
        self._lock = lock

        AIOEventHandler.__init__(self, loop)
        FileSystemEventHandler.__init__(self, **kwargs)
Exemple #10
0
    def __init__(self, notify_callback, loop=None, **kwargs):
        self._notify_callback = notify_callback

        AIOEventHandler.__init__(self, loop)
        PatternMatchingEventHandler.__init__(self, **kwargs)