Utilities/BackgroundService.py

changeset 6348
d6c0b8ab1fc6
parent 6321
f85288918089
child 6367
7bc6fc02d981
equal deleted inserted replaced
6347:bcca9eba56a1 6348:d6c0b8ab1fc6
66 66
67 port = self.serverPort() 67 port = self.serverPort()
68 ## Note: Need the port if started external in debugger: 68 ## Note: Need the port if started external in debugger:
69 print('BackgroundService listening on: {0:d}'.format(port)) 69 print('BackgroundService listening on: {0:d}'.format(port))
70 # __IGNORE_WARNING__ 70 # __IGNORE_WARNING__
71 for pyName in ['Python', 'Python3']: 71 for pyName in ['Python2', 'Python3']:
72 interpreter = Preferences.getDebugger( 72 venvName = Preferences.getDebugger(
73 pyName + "Interpreter") 73 pyName + "VirtualEnv")
74 process = self.__startExternalClient(interpreter, port) 74 interpreter = e5App().getObject("VirtualEnvManager")\
75 if process: 75 .getVirtualenvInterpreter(venvName)
76 if pyName == 'Python': 76 if interpreter:
77 pyName = 'Python2' 77 process = self.__startExternalClient(interpreter, port)
78 self.processes[pyName] = process, interpreter 78 if process:
79 self.processes[pyName] = process, interpreter
79 80
80 def __startExternalClient(self, interpreter, port): 81 def __startExternalClient(self, interpreter, port):
81 """ 82 """
82 Private method to start the background client as external process. 83 Private method to start the background client as external process.
83 84

eric ide

mercurial