(Jul-13-2022, 07:51 AM)Gribouillis Wrote: Not a Windows user here, but you could try
import subprocess as sp process = sp.Popen(['cmd', '/k', 'node serveronly'], cwd='C:/MagicMirror') process.wait()
Great, Thanks.
It runs the command, but it stops running my current python script to execute the MagicMirror cmd.
Is there a way to open a whole new cmd prompt window and execute that chunk of code there, that way my main python script doesn't get interrupted and I can still use it in the background.
Here's what I mean:
This is what I get when I run it. I have my Voice Assistant run, and when I open MagicMirror it stops running because it runs the cmd in the same window, not a new one.
Output:┌──────────────────────────────────────────────────── B.A.X.T.E.R ────────────────────────────────────────────────────┐
│ Listening... │
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
┌──────────────────────────────────────────────────── B.A.X.T.E.R ────────────────────────────────────────────────────┐
│ Recognizing... │
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
┌───────────────────────────────────────────────────── Commander ─────────────────────────────────────────────────────┐
│ hello │
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
┌──────────────────────────────────────────────────── B.A.X.T.E.R ────────────────────────────────────────────────────┐
│ Hello, how are you today? │
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
┌──────────────────────────────────────────────────── B.A.X.T.E.R ────────────────────────────────────────────────────┐
│ Listening... │
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
┌──────────────────────────────────────────────────── B.A.X.T.E.R ────────────────────────────────────────────────────┐
│ Recognizing... │
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
┌───────────────────────────────────────────────────── Commander ─────────────────────────────────────────────────────┐
│ magic mirror │
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
[13.07.2022 20:47.16.529] [LOG] Starting MagicMirror: v2.18.0
[13.07.2022 20:47.16.530] [LOG] Loading config ...
[13.07.2022 20:47.16.532] [LOG] Loading module helpers ...
[13.07.2022 20:47.16.532] [LOG] No helper found for module: alert.
[13.07.2022 20:47.16.535] [LOG] Initializing new module helper ...
[13.07.2022 20:47.16.536] [LOG] Module helper loaded: updatenotification
[13.07.2022 20:47.16.536] [LOG] No helper found for module: clock.
[13.07.2022 20:47.16.573] [LOG] Initializing new module helper ...
[13.07.2022 20:47.16.574] [LOG] Module helper loaded: calendar
[13.07.2022 20:47.16.574] [LOG] No helper found for module: compliments.
[13.07.2022 20:47.16.574] [LOG] No helper found for module: weather.
[13.07.2022 20:47.16.580] [LOG] Initializing new module helper ...
[13.07.2022 20:47.16.580] [LOG] Module helper loaded: newsfeed
[13.07.2022 20:47.16.580] [LOG] All module helpers loaded.
[13.07.2022 20:47.16.610] [LOG] Starting server on port 8080 ...
[13.07.2022 20:47.16.618] [LOG] Server started ...
[13.07.2022 20:47.16.618] [LOG] Connecting socket for: updatenotification
[13.07.2022 20:47.16.619] [LOG] Starting module helper: updatenotification
[13.07.2022 20:47.16.620] [LOG] Connecting socket for: calendar
[13.07.2022 20:47.16.620] [LOG] Starting node helper for: calendar
[13.07.2022 20:47.16.620] [LOG] Connecting socket for: newsfeed
[13.07.2022 20:47.16.620] [LOG] Starting node helper for: newsfeed
[13.07.2022 20:47.16.620] [LOG] Sockets connected & modules started ...
[13.07.2022 20:47.16.621] [LOG]
Ready to go! Please point your browser to: http://localhost:8080
Thanks.