Python PyV8安装测试(Win7)

版权声明:本文为博主 http://blog.csdn.net/churximi 原创文章,未经允许不得转载,谢谢。 https://blog.csdn.net/churximi/article/details/53895176

PyV8下载地址

https://code.google.com/archive/p/pyv8/downloads

测试代码

import PyV8

ctxt = PyV8.JSContext()
ctxt.enter()
func = ctxt.eval("""
    (function(){
        function hello(){
            return "Hello world.";
        }
        return hello();
    })
""")
print func()

输出结果:Hello World.

参考文献
http://blog.csdn.net/hanshileiai/article/details/51628173

猜你喜欢

转载自blog.csdn.net/churximi/article/details/53895176