Debugger/DebuggerInterfacePython.py

changeset 40
c2e5472b112c
parent 15
f6ccc31d6e72
child 53
c3eb7cc1ff8b
diff -r ce735122a1fb -r c2e5472b112c Debugger/DebuggerInterfacePython.py
--- a/Debugger/DebuggerInterfacePython.py	Fri Jan 08 14:45:03 2010 +0000
+++ b/Debugger/DebuggerInterfacePython.py	Fri Jan 08 17:04:18 2010 +0000
@@ -10,7 +10,6 @@
 import sys
 import os
 import socket
-import subprocess
 
 from PyQt4.QtCore import *
 from PyQt4.QtGui import QInputDialog, QMessageBox
@@ -42,7 +41,7 @@
         else:
             exts.append(".%s" % ext)
     
-    if exts:
+    if exts and Preferences.getDebugger("PythonInterpreter"):
         return ["Python", ClientDefaultCapabilities, exts]
     else:
         return ["", 0, []]
@@ -144,12 +143,13 @@
         @return client process object (QProcess) and a flag to indicate
             a network connection (boolean)
         """
-        if Preferences.getDebugger("CustomPythonInterpreter"):
-            interpreter = Preferences.getDebugger("PythonInterpreter")
-            if interpreter == "":
-                interpreter = sys.executable
-        else:
-            interpreter = sys.executable
+        interpreter = Preferences.getDebugger("PythonInterpreter")
+        if interpreter == "":
+            QMessageBox.critical(None,
+                self.trUtf8("Start Debugger"),
+                self.trUtf8(\
+                    """<p>No Python2 interpreter configured.</p>"""))
+            return None, False
         
         debugClientType = Preferences.getDebugger("DebugClientType")
         if debugClientType == "standard":
@@ -941,4 +941,4 @@
         if self.qsock is not None:
             self.qsock.write(cmd.encode('utf8'))
         else:
-            self.queue.append(cmd)
\ No newline at end of file
+            self.queue.append(cmd)

eric ide

mercurial