import os
#获取父路径
def get_aft_path():
return os.getcwd()
#获取父路径
def get_aft_parent_path():
return os.path.abspath('')
可以通过os.path.abspath('..')返回多层路径
import os
#获取父路径
def get_aft_path():
return os.getcwd()
#获取父路径
def get_aft_parent_path():
return os.path.abspath('')
可以通过os.path.abspath('..')返回多层路径