def mkdir(path):
import os
path=path.strip()
path=path.rstrip("")
isExists=os.path.exists(path)
if not isExists:
os.makedirs(path)
print path+' 创建成功'
return True
else:
print path+' 目录已存在'
return False
mkpath="d:qttcweb"
mkdir(mkpath)