1.0.11 • Published 8 years ago

runpy v1.0.11

Weekly downloads
12
License
ISC
Repository
github
Last release
8 years ago

RUNPY

run any python script directly from node interface

Installation

npm install runpy --save

Usage

var python = require('runpy') 
var str = "print 'hello world'"
python.run(str,function(output,data){
    if(err){
      console.log(error)
    }
    else{
      console.log(output)
    }
})
var path = "tmp.py"
python.runFile(path,function(output,error){
    if(err){
      console.log(error)
    }
    else{
      console.log(output)
    }
})

Tests

npm test

Examples

python.run(" any python script ",function(output,error){
    console.log(output) 
}) 
python.runFile("path/to/pythonfile",function(output,error){
  console.log(output) 

})

Contributing

Run any python script directly form node . Run any python file (.py) directly from node easy to handle errors

Requirement

Python installed on the machine

Release History

  • 1.0.0 Initial release
  • 0.0.9 Run python files
1.0.11

8 years ago

1.0.10

8 years ago

1.0.9

8 years ago

1.0.7

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago