Python bindings and utils for Node.js and io.js.
from nodejs.bindings import node_run
stderr, stdout = node_run('/path/to/some/file.js', '--some-argument')
pip install nodejs
Invokes Node with the arguments provided and return the resulting stderr and stdout.
from nodejs.bindings import node_run
stderr, stdout = node_run('/path/to/some/file.js', '--some-argument')
Raises an exception if node is not installed.
Raises an exception if the installed version of node is less than the version required.
Arguments:
version_required
: a tuple containing the minimum version required.
from nodejs.bindings import ensure_node_version_gte
ensure_node_version_gte((0, 10, 0,))
A boolean indicating if Node is installed.
A tuple containing the version of Node installed. For example, (0, 10, 33)
A string containing the raw version returned from Node. For example, 'v0.10.33'
mkvirtualenv python-nodejs
pip install -r requirements.txt
nosetests