Debugger/DebugServer.py

branch
maintenance
changeset 6518
926d65bd23b8
parent 6455
22a6fc33ab6d
parent 6503
e617c58807e8
child 6602
331ac8f99cf8
equal deleted inserted replaced
6492:8214753ae98b 6518:926d65bd23b8
12 str = unicode 12 str = unicode
13 except NameError: 13 except NameError:
14 pass 14 pass
15 15
16 import os 16 import os
17 import sys
17 18
18 from PyQt5.QtCore import pyqtSignal, QModelIndex 19 from PyQt5.QtCore import pyqtSignal, QModelIndex
19 from PyQt5.QtNetwork import QTcpServer, QHostAddress, QHostInfo, \ 20 from PyQt5.QtNetwork import QTcpServer, QHostAddress, QHostInfo, \
20 QNetworkInterface 21 QNetworkInterface
21 22
208 self.clientProcess = None 209 self.clientProcess = None
209 self.clientInterpreter = "" 210 self.clientInterpreter = ""
210 self.clientType = \ 211 self.clientType = \
211 Preferences.Prefs.settings.value('DebugClient/Type') 212 Preferences.Prefs.settings.value('DebugClient/Type')
212 if self.clientType is None: 213 if self.clientType is None:
213 import sys
214 if sys.version_info[0] == 2: 214 if sys.version_info[0] == 2:
215 self.clientType = 'Python2' 215 self.clientType = 'Python2'
216 else: 216 else:
217 self.clientType = 'Python3' 217 self.clientType = 'Python3'
218 # Change clientType if dependent interpreter not exist anymore 218 # Change clientType if dependent interpreter does not exist anymore
219 # (maybe deinstalled,...) 219 # (maybe deinstalled,...)
220 elif self.clientType == 'Python2' and Preferences.getDebugger( 220 elif self.clientType == 'Python2' and Preferences.getDebugger(
221 "Python2VirtualEnv") == '': 221 "Python2VirtualEnv") == '' and sys.version_info[0] == 3:
222 self.clientType = 'Python3' 222 self.clientType = 'Python3'
223 elif self.clientType == 'Python3' and Preferences.getDebugger( 223 elif self.clientType == 'Python3' and Preferences.getDebugger(
224 "Python3VirtualEnv") == '': 224 "Python3VirtualEnv") == '' and sys.version_info[0] == 2:
225 self.clientType = 'Python2' 225 self.clientType = 'Python2'
226 226
227 self.lastClientType = '' 227 self.lastClientType = ''
228 self.__autoClearShell = False 228 self.__autoClearShell = False
229 229

eric ide

mercurial