csvExporter.py 文件源码

python
阅读 30 收藏 0 点赞 0 评论 0

项目:safetyculture-sdk-python 作者: SafetyCulture 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号