icons.py 文件源码

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

项目:yamlloader 作者: fuzzysteve 项目源码 文件源码
def importyaml(connection,metadata,sourcePath):
    eveIcons = Table('eveIcons',metadata)
    print "Importing Icons"
    print "Opening Yaml"
    with open(os.path.join(sourcePath,'fsd','iconIDs.yaml'),'r') as yamlstream:
        trans = connection.begin()
        icons=load(yamlstream,Loader=SafeLoader)
        print "Yaml Processed into memory"
        for icon in icons:
            connection.execute(eveIcons.insert(),
                            iconID=icon,
                            iconFile=icons[icon].get('iconFile',''),
                            description=icons[icon].get('description',''))
    trans.commit()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号