run-python

0.1.1 • Public • Published

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');
  })
})

Readme

Keywords

none

Package Sidebar

Install

npm i run-python

Weekly Downloads

2

Version

0.1.1

License

GPL-3.0

Unpacked Size

37 kB

Total Files

4

Last publish

Collaborators

  • simonmeusel