eric machine
eric machine

Reputation: 41

How can node.js call python code?

I will need to run some python scripts from my node.js code on an Amazon EC2 VPS.

Is this possible with node.js?

Upvotes: 1

Views: 264

Answers (1)

Edgar
Edgar

Reputation: 113

For node and Python on the same computer, there are two solutions:

(1) node can call most Python scripts using the nodeJS child process API

(2) node code can talk to Python code via sockets (either at localhost 127.0.0.1 or Unix-based) if the Python code supports sockets

Upvotes: 2

Related Questions