Note that the nodejs
package on PyPI has been passed on to another user that is actively bundling node binaries. See https://github.com/samwillis/nodejs-pypi for more information.
If you want to use the legacy version of this package, you can install it with pip install nodejs==0.1.1
or pin it to nodejs==0.1.1
in your requirements.txt.
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==0.1.1
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