【问题标题】:How to check in python that a file in a folder has changed? [duplicate]如何在python中检查文件夹中的文件是否已更改? [复制]
【发布时间】:2012-09-16 22:58:00
【问题描述】:

每当在特定目录中添加/删除/修改新文件时,我都需要在 python 中知道 有办法吗? 我正在寻找一个类似“inofity”的函数(来自 POSIX)。

谢谢

【问题讨论】:

  • python inotify -> pyinotify github.com/seb-m/pyinotify/wiki
  • 我对此有一个答案,但它一直被否决,无论是 7 年前。所以,无论如何,我删除了它。

标签: python inotify


【解决方案1】:

您可以使用inotify for python,它与PyInotify(旧版)相同。

【讨论】:

    【解决方案2】:

    正如similar question 中提到的,您可能想看看http://packages.python.org/watchdog/,它也适用于Windows。

    【讨论】:

      猜你喜欢
      • 2014-05-17
      • 1970-01-01
      • 2011-04-08
      • 1970-01-01
      • 2019-01-24
      • 1970-01-01
      • 2011-03-25
      • 2018-09-13
      • 1970-01-01
      相关资源
      最近更新 更多