def delete_file_in_dir(dir): if not os.path.exists(dir): return 1 try: for i in os.listdir(dir): path_way = os.path.join(dir,i) #如果是文件就删除 ...