python 判断文件夹存在,不存在创建文件夹

判断文件文件夹是否存在

'''
    判断文件是否存在,存在无效果,不存在则生成文件夹
    path:路径的绝对路径,通过获取当前文件的绝对路径,再将文件夹文件拼接起来
'''
def isexists_dir_Create(self,path):
     if not os.path.exists(path):
        os.makedirs(path)
原文地址:https://www.cnblogs.com/dyd520/p/11266285.html