def get_tools_path():
if getattr(sys, 'frozen', False):
# we are running in a bundle
bundle_dir = sys._MEIPASS
else:
# we are running in a normal Python environment
bundle_dir = os.path.dirname(os.path.abspath(__file__))
if sys.platform == "win32":
return os.path.join(bundle_dir, "tools", "win" + BITS)
elif sys.platform == "linux" or sys.platform == "linux2":
return os.path.join(bundle_dir, "tools", "linux" + BITS)
评论列表
文章目录