From 1ee229498458504bba4b20acaa71cf831d380317 Mon Sep 17 00:00:00 2001 From: yoshi74ls181 Date: Wed, 8 Feb 2023 15:41:18 +0900 Subject: [PATCH] Launch a new app using the same python executable --- plottr/apps/appmanager.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plottr/apps/appmanager.py b/plottr/apps/appmanager.py index 5e283a4b..a62a31ee 100644 --- a/plottr/apps/appmanager.py +++ b/plottr/apps/appmanager.py @@ -13,6 +13,7 @@ will result in the app not opening without an error warning. """ +import sys import zmq from pathlib import Path from typing import Dict, Union, Any, Callable, Tuple, Optional @@ -352,7 +353,7 @@ def launchApp(self, Id: IdType, module: str, func: str, *args: Any) -> bool: fullArgs = [str(Path(plottrPath).joinpath('apps', 'apprunner.py')), str(port), module, func] + list(args) process = QtCore.QProcess() - process.start('python', fullArgs) + process.start(sys.executable, fullArgs) process.waitForStarted(100) socket = self.context.socket(zmq.REQ) socket.connect(f'tcp://{self.address}:{str(port)}')