testShellItem.py 文件源码

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

项目:remoteControlPPT 作者: htwenning 项目源码 文件源码
def test_parsing_name(self):
        sf = shell.SHGetDesktopFolder()
        flags = shellcon.SHCONTF_FOLDERS | shellcon.SHCONTF_NONFOLDERS
        children = sf.EnumObjects(0, flags)
        child_pidl = children.next()
        name = sf.GetDisplayNameOf(child_pidl, shellcon.SHGDN_FORPARSING)

        item = shell.SHCreateItemFromParsingName(name, None, shell.IID_IShellItem)
        # test the name we get from the item is the same as from the folder.
        self.assertEqual(name, item.GetDisplayName(shellcon.SHGDN_FORPARSING))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号