1.python的脚本如下: ############################################################################### #created on 2013-07-09 #author : zhaolijun #used to get weblogic server runtime infomation #wls_ver:weblogic 10.3.5.0 #####################################
Python监控文件变化有两种库:pyinotify和watchdog.pyinotify依赖于Linux平台的inotify,后者则对不同平台的的事件都进行了封装.也就是说,watchdog跨平台. 下面看一个小demo from watchdog.observers import Observer from watchdog.events import * import time class FileEventHandler(FileSystemEventHandler): def __in