Utilities/BackgroundService.py

changeset 6348
d6c0b8ab1fc6
parent 6321
f85288918089
child 6367
7bc6fc02d981
--- a/Utilities/BackgroundService.py	Fri Jun 15 11:56:58 2018 +0200
+++ b/Utilities/BackgroundService.py	Fri Jun 15 18:49:48 2018 +0200
@@ -68,14 +68,15 @@
         ## Note: Need the port if started external in debugger:
         print('BackgroundService listening on: {0:d}'.format(port))
         # __IGNORE_WARNING__
-        for pyName in ['Python', 'Python3']:
-            interpreter = Preferences.getDebugger(
-                pyName + "Interpreter")
-            process = self.__startExternalClient(interpreter, port)
-            if process:
-                if pyName == 'Python':
-                    pyName = 'Python2'
-                self.processes[pyName] = process, interpreter
+        for pyName in ['Python2', 'Python3']:
+            venvName = Preferences.getDebugger(
+                pyName + "VirtualEnv")
+            interpreter = e5App().getObject("VirtualEnvManager")\
+                .getVirtualenvInterpreter(venvName)
+            if interpreter:
+                process = self.__startExternalClient(interpreter, port)
+                if process:
+                    self.processes[pyName] = process, interpreter
 
     def __startExternalClient(self, interpreter, port):
         """

eric ide

mercurial