render.py 文件源码

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

项目:simpleredcapbuilder 作者: agapow 项目源码 文件源码
def expand (self, db_schema, inc_tags=False, exc_tags=False,
            out_pth=_TEMPLATE_PTH):
        self.db_schema = db_schema
        self.inc_tags, self.exc_tags = inc_tags, exc_tags
        assert not (inc_tags and exc_tags), "cannot have included and excluded tags"
        with open (out_pth, 'w') as out_hndl:
            self.out_hndl = out_hndl
            self.csv_writer = csv.DictWriter (out_hndl,
                fieldnames=[x.value for x in consts.OUTPUT_COLS],
                extrasaction='ignore',
                quoting=csv.QUOTE_ALL,
            )
            self.csv_writer.writeheader()

            for f in self.db_schema:
                self.expand_form (f)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号