import time
import os
print(os.path.abspath('..'))
picture_time = time.strftime("%Y-%m-%d-%H_%M_%S", time.localtime(time.time()))
directory_time = time.strftime("%Y-%m-%d", time.localtime(time.time()))
print(picture_time)
print(directory_time)
print("当前项目路径:" + os.getcwd())
try:
File_Path = os.getcwd() + "/" + directory_time + "/"
print(File_Path)
if not os.path.exists(File_Path):
os.makedirs(File_Path)
print("目录新建成功:" + File_Path)
else:
print("目录已存在!!!")
except BaseException as msg:
print("新建目录失败:" + msg)