Added runhelper

feature/node-rewrite
Sven Slootweg 13 years ago
parent 107fd1da97
commit 0c0844f77c

@ -0,0 +1,19 @@
#!/usr/bin/python
import json, subprocess
from optparse import OptionParser
parser = OptionParser()
(options, args) = parser.parse_args()
pr = subprocess.Popen(args[0], shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
data = pr.communicate()
pr.wait()
obj = {
'stdout': data[0],
'stderr': data[1],
'return': pr.returncode
}
print json.dumps(obj)
Loading…
Cancel
Save