Debugger/DebuggerInterfacePython3.py

changeset 40
c2e5472b112c
parent 27
1018a0347ae9
child 53
c3eb7cc1ff8b
equal deleted inserted replaced
39:ce735122a1fb 40:c2e5472b112c
8 """ 8 """
9 9
10 import sys 10 import sys
11 import os 11 import os
12 import socket 12 import socket
13 import subprocess
14 13
15 from PyQt4.QtCore import * 14 from PyQt4.QtCore import *
16 from PyQt4.QtGui import QInputDialog, QMessageBox 15 from PyQt4.QtGui import QInputDialog, QMessageBox
17 16
18 from E4Gui.E4Application import e4App 17 from E4Gui.E4Application import e4App
40 if ext.startswith("."): 39 if ext.startswith("."):
41 exts.append(ext) 40 exts.append(ext)
42 else: 41 else:
43 exts.append(".%s" % ext) 42 exts.append(".%s" % ext)
44 43
45 if exts and Preferences.getDebugger("Python3Interpreter"): 44 if exts:
46 return ["Python3", ClientDefaultCapabilities, exts] 45 return ["Python3", ClientDefaultCapabilities, exts]
47 else: 46 else:
48 return ["", 0, []] 47 return ["", 0, []]
49 48
50 class DebuggerInterfacePython3(QObject): 49 class DebuggerInterfacePython3(QObject):
142 @param runInConsole flag indicating to start the debugger in a 141 @param runInConsole flag indicating to start the debugger in a
143 console window (boolean) 142 console window (boolean)
144 @return client process object (QProcess) and a flag to indicate 143 @return client process object (QProcess) and a flag to indicate
145 a network connection (boolean) 144 a network connection (boolean)
146 """ 145 """
147 interpreter = Preferences.getDebugger("Python3Interpreter") 146 if Preferences.getDebugger("CustomPython3Interpreter"):
148 if interpreter == "": 147 interpreter = Preferences.getDebugger("Python3Interpreter")
149 QMessageBox.critical(None, 148 if interpreter == "":
150 self.trUtf8("Start Debugger"), 149 interpreter = sys.executable
151 self.trUtf8(\ 150 else:
152 """<p>No Python3 interpreter configured.</p>""")) 151 interpreter = sys.executable
153 return None, False
154 152
155 debugClientType = Preferences.getDebugger("DebugClientType3") 153 debugClientType = Preferences.getDebugger("DebugClientType3")
156 if debugClientType == "standard": 154 if debugClientType == "standard":
157 debugClient = os.path.join(getConfig('ericDir'), 155 debugClient = os.path.join(getConfig('ericDir'),
158 "DebugClients", "Python3", "DebugClient.py") 156 "DebugClients", "Python3", "DebugClient.py")

eric ide

mercurial