8

Is it possible to create a glue that makes it possible for python modules (more specifically, library bindings) to be used in node.js? Some of the data structures can be directly mapped to V8 objects - e.g. array, dict.

More importantly - would that be a more elegant way to create bindings than manually or through FFI. In short, would it be worth it?

3
  • 1
    Theoretically possible, but I've never heard of this being implemented, and it's unlikely to be worthwhile. Commented Feb 24, 2013 at 19:49
  • maybe something from this question will help? stackoverflow.com/questions/683462/… Commented Feb 24, 2013 at 20:12
  • I saw that, but this is a question if python modules can/should be ported to node.js rather than an actual problem that requires a JS <-> Python bridge. Commented Feb 24, 2013 at 23:10

2 Answers 2

3

Try this node.js module, that is a bridge: Node-Python,

NOTE: The Project is 7 years old and still stuck at v0.4. A lot of functionality like converting between Python and Node arrays is still missing. It may be safe to assume that it's no longer supported by its original author(s)

Sign up to request clarification or add additional context in comments.

Comments

2

Edge.js does a fine job at this. It allows you to write a Python script and then call the routines from Node.js, which can be used to easily create bindings with python modules.

1 Comment

Note on that - it uses IronPython, .NET's python implementation, and for Edge.js, the docs say (as of 2018-03-14) that this has only been tested on Windows.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.