document.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:remoteControlPPT 作者: htwenning 项目源码 文件源码
def RefreshEvent(self):
        self.hwnd = self.doc.GetFirstView().GetSafeHwnd()
        if self.watchEvent is not None:
            win32api.FindCloseChangeNotification(self.watchEvent)
            self.watchEvent = None
        path = self.doc.GetPathName()
        if path: path = os.path.dirname(path)
        if path:
            filter = win32con.FILE_NOTIFY_CHANGE_FILE_NAME | \
                     win32con.FILE_NOTIFY_CHANGE_ATTRIBUTES | \
                     win32con.FILE_NOTIFY_CHANGE_LAST_WRITE
            try:
                self.watchEvent = win32api.FindFirstChangeNotification(path, 0, filter)
            except win32api.error, exc:
                print "Can not watch file", path, "for changes -", exc.strerror
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号