摘要:
os.listdir()os.path.isdir()os.path.join()os.mkdir() 1 # -*- coding:utf-8 -*- 2 import os,sys 3 4 5 def mkdir(path = os.getcwd()): 6 if 'img' in os.listdir(path) and os.path.isdir(os.path.join(path,'img')): 7 pass 8 else: 9 os.mkdir(os.path.join(path,'img'))10 subpath = ... 阅读全文