run-python
v0.1.1
Published
Run python commands from node
Downloads
4
Readme
run-python
Run python commands from node
Allows you to run python commands from node. You can declare variables, use loops, import modules (useful if you want to port a python package to node) and everything else you can normally use in python. This needs python to be installed.
This module uses promises.
Installation
- Install python
- Install node and npm (Developed with node v8.1.3)
- Install
run-python
$ npm i --save run-python
Example
const rp = new (require('run-python'))
rp.run('import os')
.then(() => {
rp.run('print("test")')
.then(() => {
console.log('Finished');
})
})