filterDemo.py 文件源码

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

项目:CodeReader 作者: jasonrbr 项目源码 文件源码
def _get_properties(self, properties):
        """
        Use OLE property sets to get base properties
        """
        try:
            pss = self.stg.QueryInterface(pythoncom.IID_IPropertySetStorage )
        except pythoncom.com_error as e:
            self._trace('No Property information could be retrieved', e)
            return

        ps = pss.Open(PSGUID_SUMMARYINFORMATION)

        props = (PIDSI_TITLE, PIDSI_SUBJECT, PIDSI_AUTHOR,  PIDSI_KEYWORDS, PIDSI_COMMENTS)

        title, subject, author, keywords, comments = ps.ReadMultiple(props)
        if title is not None:
            properties['title'] = title
        if subject is not None:
            properties['description'] = subject
        if author is not None:    
            properties['author'] = author
        if keywords is not None:    
            properties['keywords'] = keywords
        if comments is not None:
            properties['comments'] = comments
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号