Debugger/DebuggerInterfacePython.py

changeset 40
c2e5472b112c
parent 15
f6ccc31d6e72
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: 44 if exts and Preferences.getDebugger("PythonInterpreter"):
46 return ["Python", ClientDefaultCapabilities, exts] 45 return ["Python", ClientDefaultCapabilities, exts]
47 else: 46 else:
48 return ["", 0, []] 47 return ["", 0, []]
49 48
50 class DebuggerInterfacePython(QObject): 49 class DebuggerInterfacePython(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 if Preferences.getDebugger("CustomPythonInterpreter"): 146 interpreter = Preferences.getDebugger("PythonInterpreter")
148 interpreter = Preferences.getDebugger("PythonInterpreter") 147 if interpreter == "":
149 if interpreter == "": 148 QMessageBox.critical(None,
150 interpreter = sys.executable 149 self.trUtf8("Start Debugger"),
151 else: 150 self.trUtf8(\
152 interpreter = sys.executable 151 """<p>No Python2 interpreter configured.</p>"""))
152 return None, False
153 153
154 debugClientType = Preferences.getDebugger("DebugClientType") 154 debugClientType = Preferences.getDebugger("DebugClientType")
155 if debugClientType == "standard": 155 if debugClientType == "standard":
156 debugClient = os.path.join(getConfig('ericDir'), 156 debugClient = os.path.join(getConfig('ericDir'),
157 "DebugClients", "Python", "DebugClient.py") 157 "DebugClients", "Python", "DebugClient.py")

eric ide

mercurial