python 如何判断目录不存在自动创建

if not os.path.exists(filepath):
os.makedirs(filepath)