📅  最后修改于: 2022-03-11 14:50:22.543000             🧑  作者: Mango
import sys, os
def resource_path(relative_path):
if hasattr(sys, '_MEIPASS'):
return os.path.join(sys._MEIPASS, relative_path)
return os.path.join(os.path.abspath("."), relative_path)