1.0.11 • Published 10 years ago

runpy v1.0.11

Weekly downloads
12
License
ISC
Repository
github
Last release
10 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

10 years ago

1.0.10

10 years ago

1.0.9

10 years ago

1.0.7

10 years ago

1.0.5

10 years ago

1.0.4

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago