Commits

Henning Schröder committed 1c974a2

fixed console

  • Participants
  • Parent commits e85e52c

Comments (0)

Files changed (2)

File codeaide/modes/base/console.py

+# -*- coding: utf-8 -*-
 import sys
 import os
 
             cursor.removeSelectedText()
 
         l = len(self.ps1)
-        line = unicode(self.textedit.document().end().previous().text())
+        #line = unicode(self.textedit.document().end().previous().text())
+        doc = self.textedit.document()
+        line =  unicode(doc.findBlockByNumber(doc.blockCount() - 1).text())
         ps1orps2, line = line[:l], line[l:]
 
         if not key in [Qt.Key_Tab, Qt.Key_Backtab] and len(text):

File codeaide/modes/python/console.py

+# -*- coding: utf-8 -*-
 import sys
 import traceback
 
 
     def init_console(self):
         if self.__class__.instance:
-            raise TypeError, "Only one instance of Python console allowed"
+            raise TypeError("Only one instance of Python console allowed")
         self.__class__.instance = self
         sys.stdout = sys.stderr = self
         self.namespace = {}
 
 
     def push(self, line):
-        return self.inter.push(line)
+        result = self.inter.push(line)
+        return result
 
 
     def save_session(self):