📜  获取资源路径python代码示例

📅  最后修改于: 2022-03-11 14:45:53.740000             🧑  作者: Mango

代码示例1
def resource_path(relative_path):
    base_path = getattr(sys, '_MEIPASS', os.path.dirname(os.path.abspath(__file__)))
    return os.path.join(base_path, relative_path)