mpc.py 文件源码

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

项目:picopayments-cli-python 作者: CounterpartyXCP 项目源码 文件源码
def history_add_entry(**kwargs):
    if etc.history_path is not None:

        # add missing fields
        kwargs["timestamp"] = "{0}".format(time.time())
        for fieldname in HISTORY_FIELDNAMES:
            if fieldname not in kwargs:
                kwargs[fieldname] = ""

        # update history file
        writeheader = not os.path.exists(etc.history_path)
        with open(etc.history_path, 'a') as csvfile:
            writer = csv.DictWriter(csvfile, fieldnames=HISTORY_FIELDNAMES)
            if writeheader:
                writer.writeheader()
            writer.writerow(kwargs)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号