search

Home  >  Q&A  >  body text

inotify - 如何在Windows下使用Python监控文件变动

Linux下有pyinotify,Windows下是否有类似的基于事件的文件监控方案?

伊谢尔伦伊谢尔伦2825 days ago1026

reply all(1)I'll reply

  • PHP中文网

    PHP中文网2017-04-17 11:07:56

    Windows provides APIs FindFirstFileChange and FindNextFileChange, which can be packaged by yourself with ctypes.

    But I recommend you to use a library named watchdog, which is a cross-platform implementation:

    pypi: http://pypi.python.org/pypi/watchdog
    github repo: https://github.com/gorakhargosh/watch...

    reply
    0
  • Cancelreply