-
获取运行文件路径
@staticmethod
def get_run_dir():
script_path = sys.argv[0]
full_path = ""
if script_path[0] != "/":
full_path = "%s/%s" % (os.getcwd(), script_path)
else:
full_path = script_path
return os.path.dirname(full_path)
-
获取当前文件路径
@staticmethod
def get_current_dir():
current_filepath = os.path.abspath(__file__)
return os.path.dirname(current_filepath)
6969

被折叠的 条评论
为什么被折叠?



