Read the statement by Michael Teeuw here.
Executing python in js - troublshooting/development
-
@beejay22 I don’t understand why u have trouble.
the 3 files I posted work together as u designed.
does your spawn(‘/use/bin/python’, [execname]) work to return the data.
console log to seespawn and exec have different methods of returning the data. see the doc
Google search nodejs process spawn
-
Did you try it with the pyscript? Or are you talking about it the core module, node_helper and config?
And okay
-
@beejay22 I am only working on inside MagicMirror
the spawn on.data() gets called when the pgm launched outputs to stdout. my print hello
of course I made sure the python script worked both ways, before showing that
-
Okay. And yes it does return the data as output I believe
-
@beejay22 do you see this output from the node_helper in the terminal window where you do npm start?
console.log(data.toString())
from your python script