script.py 文件源码

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

项目:zenchmarks 作者: squeaky-pl 项目源码 文件源码
def ResourceTemplate(path, registry):
    from quixote import ptl_compile

    glob = {'__file__': _coerceToFilesystemEncoding("", path),
            'resource': resource.ErrorPage(500, "Whoops! Internal Error",
                                           rpyNoResource),
            'registry': registry}

    with open(path) as f:  # Not closed by quixote as of 2.9.1
        e = ptl_compile.compile_template(f, path)
    code = compile(e, "<source>", "exec")
    eval(code, glob, glob)
    return glob['resource']
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号