def write_file(self, output_csv_path, mode):
"""
Saves audit data table to a file at 'path'
:param output_csv_path: the full path to file to save
:param mode: write ('wb') or append ('ab') mode
"""
try:
csv_file = open(output_csv_path, mode)
wr = csv.writer(csv_file, dialect='excel', quoting=csv.QUOTE_ALL)
wr.writerows(self.audit_table)
csv_file.close()
except Exception as ex:
print(str(ex) + ': Error saving audit_table to ' + output_csv_path)
csvExporter.py 文件源码
python
阅读 30
收藏 0
点赞 0
评论 0
评论列表
文章目录