GDebiGtk.py 文件源码

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

项目:gdebi 作者: linuxmint 项目源码 文件源码
def _get_file_path_from_dnd_dropped_uri(self, uri):
        """ helper to get a useful path from a drop uri"""
        path = url2pathname(uri) # escape special chars
        path = path.strip('\r\n\x00') # remove \r\n and NULL
        # get the path to file
        if path.startswith('file:\\\\\\'): # windows
            path = path[8:] # 8 is len('file:///')
        elif path.startswith('file://'): # nautilus, rox
            path = path[7:] # 7 is len('file://')
        elif path.startswith('file:'): # xffm
            path = path[5:] # 5 is len('file:')
        return path
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号