install_entry.py 文件源码

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

项目:ACedIt 作者: coderick14 项目源码 文件源码
def run(self):

        default_site = 'codeforces'
        cache_dir = os.path.join(os.path.expanduser('~'), '.cache', 'ACedIt')

        from main import supported_sites

        for site in supported_sites:
                # create cache directory structure
            if not os.path.isdir(os.path.join(cache_dir, site)):
                os.makedirs(os.path.join(cache_dir, site))

        data = {'default_site': default_site.strip(
        ), 'default_contest': None, 'cachedir': cache_dir}
        with open(os.path.join(cache_dir, 'constants.json'), 'w') as f:
            f.write(json.dumps(data, indent=2))
        install.run(self)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号