basechart.py 文件源码

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

项目:SMAC-M 作者: LarsSchy 项目源码 文件源码
def create_capability_files(template_path, themes_path, map_path, fonts_path, use_debug, shapepath):
    template = Template( open( os.path.join(template_path, "SeaChart_THEME.map"), 'r' ).read() )
    for theme in os.listdir(themes_path):
        # Remove file suffix
        theme = os.path.splitext(theme)[0]

        debug_string = ""
        if use_debug:
            debug_string = str.format(debug_template, theme)

        d = get_dictionary(theme, map_path, fonts_path, debug_string)
        if shapepath:
            d['SHAPEPATH'] = shapepath
        fileout = open( os.path.join(map_path, "SeaChart_" + theme + ".map"), 'w' )

        fileout.write( template.substitute(d) )
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号