Node Python Runner
Supported by:
A library that allows you to execute python code and get its output from nodejs. You can execute inline commands or script files.
This can be useful to bridge nodejs with python code. Each execution will create a python process.
Install
npm install python-runner -g
The only dependencies of this package are:
Usage
The execution function will run send every command to the python stdin interpreter returning a Q promise. This will be resolved with the stdout of the python binary.
The python binary will be executed with the same environment variables as its parent process.
You can tweak the following options:
- bin - The python binary to be used
- env - Replace the environment variables for this python execution. Useful for PYTHONPATH, ...
Inline Script
var Python = ; Python;
Inline Script Using python3
var Python = ; Python;
Script File
var Python = ; Python;
You can always take a look at the examples folder!