python类_getfinalpathname()的实例源码

pathlib2.py 文件源码 项目:CrowdAnki 作者: Stvad 项目源码 文件源码 阅读 25 收藏 0 点赞 0 评论 0
def resolve(self, path, strict=False):
        s = str(path)
        if not s:
            return os.getcwd()
        previous_s = None
        if _getfinalpathname is not None:
            if strict:
                return self._ext_to_normal(_getfinalpathname(s))
            else:
                # End of the path after the first one not found
                tail_parts = []
                while True:
                    try:
                        s = self._ext_to_normal(_getfinalpathname(s))
                    except FileNotFoundError:
                        previous_s = s
                        s, tail = os.path.split(s)
                        tail_parts.append(tail)
                        if previous_s == s:
                            return path
                    else:
                        return os.path.join(s, *reversed(tail_parts))
        # Means fallback on absolute
        return None
pathlib2.py 文件源码 项目:pipenv 作者: pypa 项目源码 文件源码 阅读 39 收藏 0 点赞 0 评论 0
def resolve(self, path, strict=False):
        s = str(path)
        if not s:
            return os.getcwd()
        previous_s = None
        if _getfinalpathname is not None:
            if strict:
                return self._ext_to_normal(_getfinalpathname(s))
            else:
                # End of the path after the first one not found
                tail_parts = []
                while True:
                    try:
                        s = self._ext_to_normal(_getfinalpathname(s))
                    except FileNotFoundError:
                        previous_s = s
                        s, tail = os.path.split(s)
                        tail_parts.append(tail)
                        if previous_s == s:
                            return path
                    else:
                        return os.path.join(s, *reversed(tail_parts))
        # Means fallback on absolute
        return None
ntpath.py 文件源码 项目:python- 作者: secondtonone1 项目源码 文件源码 阅读 28 收藏 0 点赞 0 评论 0
def _getfinalpathname(f):
        return normcase(abspath(f))
ntpath.py 文件源码 项目:ivaochdoc 作者: ivaoch 项目源码 文件源码 阅读 22 收藏 0 点赞 0 评论 0
def _getfinalpathname(f):
        return normcase(abspath(f))
pathlib2.py 文件源码 项目:PigeonScript 作者: SilversApprentice 项目源码 文件源码 阅读 35 收藏 0 点赞 0 评论 0
def resolve(self, path):
        s = str(path)
        if not s:
            return os.getcwd()
        if _getfinalpathname is not None:
            return self._ext_to_normal(_getfinalpathname(s))
        # Means fallback on absolute
        return None
ntpath.py 文件源码 项目:zippy 作者: securesystemslab 项目源码 文件源码 阅读 25 收藏 0 点赞 0 评论 0
def _getfinalpathname(f):
        return normcase(abspath(f))
ntpath.py 文件源码 项目:zippy 作者: securesystemslab 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def samefile(f1, f2):
    "Test whether two pathnames reference the same actual file"
    return _getfinalpathname(f1) == _getfinalpathname(f2)
ntpath.py 文件源码 项目:news-for-good 作者: thecodinghub 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def _getfinalpathname(f):
        return normcase(abspath(f))
pathlib.py 文件源码 项目:click-configfile 作者: click-contrib 项目源码 文件源码 阅读 25 收藏 0 点赞 0 评论 0
def resolve(self, path):
        s = str(path)
        if not s:
            return os.getcwd()
        if _getfinalpathname is not None:
            return self._ext_to_normal(_getfinalpathname(s))
        # Means fallback on absolute
        return None
ntpath.py 文件源码 项目:Tencent_Cartoon_Download 作者: Fretice 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def _getfinalpathname(f):
        return normcase(abspath(f))
ntpath.py 文件源码 项目:fieldsight-kobocat 作者: awemulya 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def _getfinalpathname(f):
        return normcase(abspath(f))
pathlib.py 文件源码 项目:click-configfile 作者: jenisys 项目源码 文件源码 阅读 26 收藏 0 点赞 0 评论 0
def resolve(self, path):
        s = str(path)
        if not s:
            return os.getcwd()
        if _getfinalpathname is not None:
            return self._ext_to_normal(_getfinalpathname(s))
        # Means fallback on absolute
        return None
ntpath.py 文件源码 项目:CloudPrint 作者: William-An 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def _getfinalpathname(f):
        return normcase(abspath(f))
ntpath.py 文件源码 项目:ouroboros 作者: pybee 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def _getfinalpathname(f):
        return normcase(abspath(f))
pathlib.py 文件源码 项目:ouroboros 作者: pybee 项目源码 文件源码 阅读 25 收藏 0 点赞 0 评论 0
def resolve(self, path):
        s = str(path)
        if not s:
            return os.getcwd()
        if _getfinalpathname is not None:
            return self._ext_to_normal(_getfinalpathname(s))
        # Means fallback on absolute
        return None
ntpath.py 文件源码 项目:gardenbot 作者: GoestaO 项目源码 文件源码 阅读 17 收藏 0 点赞 0 评论 0
def _getfinalpathname(f):
        return normcase(abspath(f))
ntpath.py 文件源码 项目:projeto 作者: BarmyPenguin 项目源码 文件源码 阅读 64 收藏 0 点赞 0 评论 0
def _getfinalpathname(f):
        return normcase(abspath(f))
ntpath.py 文件源码 项目:flask-zhenai-mongo-echarts 作者: Fretice 项目源码 文件源码 阅读 22 收藏 0 点赞 0 评论 0
def _getfinalpathname(f):
        return normcase(abspath(f))
ntpath.py 文件源码 项目:aweasome_learning 作者: Knight-ZXW 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def _getfinalpathname(f):
        return normcase(abspath(f))
ntpath.py 文件源码 项目:kbe_server 作者: xiaohaoppy 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def _getfinalpathname(f):
        return normcase(abspath(f))
pathlib.py 文件源码 项目:kbe_server 作者: xiaohaoppy 项目源码 文件源码 阅读 25 收藏 0 点赞 0 评论 0
def resolve(self, path):
        s = str(path)
        if not s:
            return os.getcwd()
        if _getfinalpathname is not None:
            return self._ext_to_normal(_getfinalpathname(s))
        # Means fallback on absolute
        return None
ntpath.py 文件源码 项目:blog_flask 作者: momantai 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def _getfinalpathname(f):
        return normcase(abspath(f))
ntpath.py 文件源码 项目:MyFriend-Rob 作者: lcheniv 项目源码 文件源码 阅读 22 收藏 0 点赞 0 评论 0
def _getfinalpathname(f):
        return normcase(abspath(f))


问题


面经


文章

微信
公众号

扫码关注公众号