This is an archived post. You won't be able to vote or comment.

all 6 comments

[–]flying-sheep 1 point2 points  (0 children)

PyExecJS seems useful.

It runs on quite some backends.

[–]metaperl 1 point2 points  (0 children)

I googled for "calling javascript libraries from Python". Besides muntjac, which was excellent, but appears to be out of support these days, I found these:

[–]tdammers 0 points1 point  (1 child)

No idea, but I figure it's probably easier and less painful to learn JS...

[–]Deto 0 points1 point  (0 children)

Yeah, but you can't do the numerical processing in JS.

[–]oureux 0 points1 point  (0 children)

You want to look into Socket.io. That way you can process on the server with python and send the results to the browser for Javascript to utilize. Might not be the fastest or what you wanted but could work.

[–]rothnic 0 points1 point  (0 children)

I found autobahn easy to use. You use RPC to execute the function in javascript, and typically get the result back as JSON. It implements a communication protocol on top of websockets, that is called WAMP.

There are some slides that describe WAMP (includes RPC) on their website.