2 ms·
> I suspect it would be possible to build up a wrapper that emulates the entire NodeJS javascript API in PyV8 http://pyv8.googlecode.com/svn/trunk/demos/node.p
by kanzure 13y ago
> I suspect it would be possible to build up a wrapper that emulates the entire NodeJS javascript API in PyV8
http://pyv8.googlecode.com/svn/trunk/demos/node.py http://pyv8.googlecode.com/svn/trunk/demos/node.py
But I think node itself can be used with pyv8 since they are both v8. There may be some issues with the event loops but that's not an extremely hard problem. IIRC, node-webkit (or appjs?) hacked up the node event loop with the event loop from chromium.
Another neat pyv8 trick is this (incomplete..) commonjs implementation:
https://github.com/flier/pyv8/blob/master/demos/commonjs/commonjs.py https://github.com/flier/pyv8/blob/master/demos/commonjs/com...
.. so you can import node (or other commonjs) modules into python.
Although this isn't pyv8, it's possible to get python/javascript bindings for the webkit js environment (shared variables/functions/objects):
https://gist.github.com/kanzure/6581415 https://gist.github.com/kanzure/6581415
I am eager to figure out how to do a similar trick with blink or servo.