def check_dir(self, dire):
if not os.path.exists(dire):
os.makedirs(dire)
else:
def go_ahead_then(dire):
shutil.rmtree(dire)
os.makedirs(dire)
wte = tkMessageBox.askyesno(
"Warning",
"All files in\n" +
dire +
"\nwill be deleted. Continue?"
)
if wte:
wtd = tkMessageBox.askyesno("Warning", "Are you sure?")
if wtd:
go_ahead_then(dire)
print "Files erased. Continuing."
return 1
else:
tkMessageBox.showinfo(
"PyRy3D info", "Choose a different directory \n\
and try again."
)
return 0
else:
tkMessageBox.showinfo(
"PyRy3D info",
"Choose a different directory \n and try again."
)
return 0
Page3_functions.py 文件源码
python
阅读 21
收藏 0
点赞 0
评论 0
评论列表
文章目录