can we call python script in node js and run node js to get call?
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>python.py

from pymongo import MongoClient
from flask import Flask

app = Flask(__name__)

host = "10.0.0.10"
port = 8085

@app.route('/name/&lt;string:name&gt;',methods=['GET','POST'])
def GetNoteText(name):
    
    print name
    
    return "Data Received"

@app.route('/', methods=['POST'])
def abc():
    print "Hii"
    return ('Welcome')

users=[]   
@app.route('/getNames')
def getName():
    client = MongoClient('mongodb://localhost:27017/')
    db = client.bridgeUserInformationTable
    cursor = db.bridgeUsersInfo.find()
    for document in cursor:
        #print "Name : ",document['name']
        users.append(document['name'])
        print document['name']
    #print (users)
    return "&lt;html&gt;&lt;body&gt;&lt;h1&gt;"+str(users)+"&lt;/h1&gt;&lt;/body&gt;&lt;/html&gt;"
    
if __name__ == '__main__':
    app.run(
        host=host, port=port
        )</code></pre>
</div>
</div>
</p>

<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>node.j

var PythonShell = require('python-shell');
 
PythonShell.run('pass.py', function (err) {
  if (err) throw err;
  console.log('finished');
});</code></pre>
</div>
</div>
</p>

<p>As i tried can we call python script in node js after running node js script from getting input from the android device? I am lit bit confused how it should be solved? And how both languages should communicate each other like python to node js? </p>

<p><a href="http://www.zerorpc.io/" rel="nofollow">ZERORPC</a> is a really nifty library built on top of ZeroMQ. This is probably the easiest way to make call python code from Node.</p>

<p>For a really simple approach and non-robust approach, you could use a tmp file to write the python commands from Node. With an event loop running inside Python, read the tmp file for any changes and execute the commands therein. </p>

android python node.js