Receiving python code using nodejs
<p>I'm using <a href="https://www.npmjs.com/package/python-shell" rel="nofollow">python-shell</a> to run a python script that classifies an image and returns a yes/no if that image is what I'm looking for or not.</p>

<p>Node.js code: </p>

<pre><code>app.get('/classify', function(req, res) {
    var options = {
        mode: 'text',
        pythonOptions: ['-u'],
        scriptPath: 'src/',
        args: ['--image', '../../images/image.png', 'classifer.xml']
    };

    PythonShell.run('classify_images.py', options, function(err, results) {
        if (err) throw err;
        // results is an array consisting of messages collected during execution 
        console.log('results: %j', results);
    });

    res.send('classify');
});
</code></pre>

<p>If I run the command as a python script, it works fine but when I run it through node.js, it gives me back all no's.</p>

<p>The python command (in src) is:</p>

<pre><code>python classify_images.py --image ../../images/image.png classifer.xml
</code></pre>