run-python

v0.1.0
Run python command from node

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

  1. Install python
  2. Install node and npm (Developed with node v8.1.3)
  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');
  })
})

Metadata

  • GPL-3.0
  • Whatever
  • Simon Meusel
  • released 7/3/2017

Downloads

Maintainers