Wednesday, 2 August 2017

PM2, I am trying to run a Python script using exec() and the Python console window keeps popping up

Code:var tray_child = cp.exec("pythonw src/tray/qt.py", function (error, stdout, stderr) { process.exit(); }); It launches a python script and ends the nodejs script if the python script ends.It works fine executing it through a terminal with Node, like normal, but I want to run it in the background, and pm2 seems like the best solution.The problem is, when I use pm2, a blank Python console window pops up after running pm2 start script.js --no-autorestart, which I do not want to happen, I want it to be completely in the background.How can I make it so that the Python console window does not pop up anymore?

Submitted August 02, 2017 at 09:26PM by thatguywiththatname2

No comments:

Post a Comment