当前位置: 首页>>代码示例>>Python>>正文


Python EventEmitter.__init__方法代码示例

本文整理汇总了Python中watchdog.observers.api.EventEmitter.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python EventEmitter.__init__方法的具体用法?Python EventEmitter.__init__怎么用?Python EventEmitter.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在watchdog.observers.api.EventEmitter的用法示例。


在下文中一共展示了EventEmitter.__init__方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from watchdog.observers.api import EventEmitter [as 别名]
# 或者: from watchdog.observers.api.EventEmitter import __init__ [as 别名]
    def __init__(self, event_queue, watch, timeout=DEFAULT_EMITTER_TIMEOUT):
      EventEmitter.__init__(self, event_queue, watch, timeout)
      self._lock = threading.Lock()

      self._directory_handle = get_directory_handle(watch.path,
                                                    WATCHDOG_FILE_FLAGS)
      self._buffer = ctypes.create_string_buffer(BUFFER_SIZE)
开发者ID:edevil,项目名称:watchdog,代码行数:9,代码来源:read_directory_changes.py

示例2: __init__

# 需要导入模块: from watchdog.observers.api import EventEmitter [as 别名]
# 或者: from watchdog.observers.api.EventEmitter import __init__ [as 别名]
 def __init__(self, event_queue, watch, timeout=DEFAULT_EMITTER_TIMEOUT,
              stat=default_stat, listdir=os.listdir):
     EventEmitter.__init__(self, event_queue, watch, timeout)
     self._snapshot = None
     self._lock = threading.Lock()
     self._take_snapshot = lambda: DirectorySnapshot(
         self.watch.path, self.watch.is_recursive, stat=stat, listdir=listdir)
开发者ID:skcript,项目名称:watchdog,代码行数:9,代码来源:polling.py

示例3: __init__

# 需要导入模块: from watchdog.observers.api import EventEmitter [as 别名]
# 或者: from watchdog.observers.api.EventEmitter import __init__ [as 别名]
 def __init__(self, event_queue, watch, timeout=DEFAULT_EMITTER_TIMEOUT):
     EventEmitter.__init__(self, event_queue, watch, timeout)
     self.wm = pyinotify.WatchManager()
     self.notifier = pyinotify.Notifier(self.wm, InotifyEventHandler(emitter=self))
     self.wm.add_watch(watch.path, mask, rec=watch.is_recursive)
     self.stopped = threading.Event()
     self.path = watch.path
开发者ID:DanielOaks,项目名称:watchdog,代码行数:9,代码来源:inotify_pyinotify.py

示例4: __init__

# 需要导入模块: from watchdog.observers.api import EventEmitter [as 别名]
# 或者: from watchdog.observers.api.EventEmitter import __init__ [as 别名]
    def __init__(self, event_queue, watch, timeout = DEFAULT_EMITTER_TIMEOUT):
        EventEmitter.__init__(self, event_queue, watch, timeout)
        self._kq = select.kqueue()
        self._lock = threading.RLock()
        self._descriptors = KeventDescriptorSet()

        def walker_callback(path, stat_info, self = self):
            self._register_kevent(path, stat.S_ISDIR(stat_info.st_mode))

        self._snapshot = DirectorySnapshot(watch.path, watch.is_recursive, walker_callback)
开发者ID:connoryang,项目名称:dec-eve-serenity,代码行数:12,代码来源:kqueue.py

示例5: __init__

# 需要导入模块: from watchdog.observers.api import EventEmitter [as 别名]
# 或者: from watchdog.observers.api.EventEmitter import __init__ [as 别名]
 def __init__(self, event_queue, watch, timeout=DEFAULT_EMITTER_TIMEOUT):
   EventEmitter.__init__(self, event_queue, watch, timeout)
   self._lock = threading.Lock()
   self._inotify = Inotify(watch.path, watch.is_recursive)
开发者ID:edevil,项目名称:watchdog,代码行数:6,代码来源:inotify.py

示例6: __init__

# 需要导入模块: from watchdog.observers.api import EventEmitter [as 别名]
# 或者: from watchdog.observers.api.EventEmitter import __init__ [as 别名]
 def __init__(self, event_queue, watch, timeout=DEFAULT_EMITTER_TIMEOUT):
     EventEmitter.__init__(self, event_queue, watch, timeout)
     self._snapshot = DirectorySnapshot(watch.path, watch.is_recursive)
     self._lock = threading.Lock()
开发者ID:hectorj2f,项目名称:file_metadata_collector,代码行数:6,代码来源:polling.py

示例7: __init__

# 需要导入模块: from watchdog.observers.api import EventEmitter [as 别名]
# 或者: from watchdog.observers.api.EventEmitter import __init__ [as 别名]
 def __init__(self, event_queue, watch, timeout=DEFAULT_EMITTER_TIMEOUT):
     EventEmitter.__init__(self, event_queue, watch, timeout)
     self._lock = threading.Lock()
     self._inotify = None
开发者ID:Arash-Afshar,项目名称:watchdog,代码行数:6,代码来源:inotify.py

示例8: __init__

# 需要导入模块: from watchdog.observers.api import EventEmitter [as 别名]
# 或者: from watchdog.observers.api.EventEmitter import __init__ [as 别名]
 def __init__(self, event_queue, watch, timeout=DEFAULT_EMITTER_TIMEOUT):
     EventEmitter.__init__(self, event_queue, watch, timeout)
     self._fsevents = FSEventsQueue(watch.path)
     self._fsevents.start()
开发者ID:Arash-Afshar,项目名称:watchdog,代码行数:6,代码来源:fsevents2.py

示例9: __init__

# 需要导入模块: from watchdog.observers.api import EventEmitter [as 别名]
# 或者: from watchdog.observers.api.EventEmitter import __init__ [as 别名]
 def __init__(self, event_queue, watch, make_snapshot, timeout):
   EventEmitter.__init__(self, event_queue, watch, timeout)
   self._make_snapshot = make_snapshot
   self._snapshot = make_snapshot(self.watch.path)
开发者ID:Thilas,项目名称:xbmc-addon-watchdog,代码行数:6,代码来源:polling.py

示例10: __init__

# 需要导入模块: from watchdog.observers.api import EventEmitter [as 别名]
# 或者: from watchdog.observers.api.EventEmitter import __init__ [as 别名]
 def __init__(self, event_queue, watch, timeout=DEFAULT_EMITTER_TIMEOUT):
     EventEmitter.__init__(self, event_queue, watch, timeout)
     self._lock = threading.Lock()
     self._handle = get_directory_handle(watch.path)
开发者ID:Amber-Creative,项目名称:ambererpnext,代码行数:6,代码来源:read_directory_changes.py

示例11: __init__

# 需要导入模块: from watchdog.observers.api import EventEmitter [as 别名]
# 或者: from watchdog.observers.api.EventEmitter import __init__ [as 别名]
 def __init__(self, event_queue, watch, timeout=1):
     EventEmitter.__init__(self, event_queue, watch, timeout)
     self._snapshot = None
开发者ID:lidormalicb,项目名称:xbmc-addon-watchdog,代码行数:5,代码来源:polling.py


注:本文中的watchdog.observers.api.EventEmitter.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。