因此资源包
import os
单层级文件夹判断存在及创建
filepath = 'singlefilename'
if not os.path.isdir(filepath)
# 创建文件夹
os.mkdir(filepath)
多层级文件夹判断存在及创建
filepath = 'multifilename'
if not os.path.isdir(filepath)
# 创建文件夹
os.makedirs(filepath)
因此资源包
import os
单层级文件夹判断存在及创建
filepath = 'singlefilename'
if not os.path.isdir(filepath)
# 创建文件夹
os.mkdir(filepath)
多层级文件夹判断存在及创建
filepath = 'multifilename'
if not os.path.isdir(filepath)
# 创建文件夹
os.makedirs(filepath)