Our Blog

We always make sure you get the latest updates from devEngineering therefore we have crafted a well organized blog to share what we are planning for you.

Run node.js script with python

Here is our approach to running node.js script with Python:

1) install Naked

pip install Naked

2) import Naked functions in python code

from Naked.toolshed.shell import execute_js, muterun_js

3) use "execute_js()" function to run node.js script

result = execute_js('testscript.js')

4) "execute_js()" function returns a boolean value. Here is how you can handle the result:

if result:
    # JavaScript is successfully executed
else:
    # JavaScript is failed