setup.py 文件源码

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

项目:gnuplot_kernel 作者: has2k1 项目源码 文件源码
def install_kernel_resources(destination,
                             resource='gnuplot_kernel',
                             files=None):
    """
    Copy the resource files to the kernelspec folder.
    """
    if files is None:
        files = ['logo-64x64.png', 'logo-32x32.png']

    for filename in files:
        try:
            data = pkgutil.get_data(resource,
                                    os.path.join('images', filename))
            with open(os.path.join(destination, filename), 'wb') as fp:
                fp.write(data)
        except Exception as e:
            sys.stderr.write(str(e))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号