files.py 文件源码

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

项目:Fuxenpruefung 作者: andb0t 项目源码 文件源码
def resource_path(basePath, relativePath):
    """ Get absolute path to resource, works for dev and for PyInstaller """
    try:
        # PyInstaller creates a temp folder and stores path in _MEIPASS
        basePath = sys._MEIPASS
    except Exception:
        basePath = os.path.abspath(".")
    finalPath = os.path.join(basePath, relativePath)
    if sys.platform != 'win32':
        finalPath = finalPath.replace('\\', '/')
    return finalPath
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号