Debugger/DebuggerInterfaceRuby.py

changeset 12
1d8dd9706f46
parent 0
de9c2efb9d02
child 13
1af94a91f439
--- a/Debugger/DebuggerInterfaceRuby.py	Fri Jan 01 16:11:36 2010 +0000
+++ b/Debugger/DebuggerInterfaceRuby.py	Sat Jan 02 15:11:35 2010 +0000
@@ -17,8 +17,8 @@
 
 from E4Gui.E4Application import e4App
 
-from DebugProtocol import *
-import DebugClientCapabilities
+from .DebugProtocol import *
+from . import DebugClientCapabilities
 
 import Preferences
 import Utilities
@@ -118,7 +118,7 @@
         proc = QProcess()
         if environment is not None:
             env = []
-            for key, value in environment.items():
+            for key, value in list(environment.items()):
                 env.append("%s=%s" % (key, value))
             proc.setEnvironment(env)
         args = []
@@ -413,7 +413,7 @@
         wd = self.translate(wd, False)
         fn = self.translate(os.path.abspath(fn), False)
         self.__sendCommand('%s%s|%s|%s|%d\n' % \
-            (RequestLoad, wd, fn, unicode(Utilities.parseOptionString(argv)), 
+            (RequestLoad, wd, fn, str(Utilities.parseOptionString(argv)), 
              traceInterpreter))
         
     def remoteRun(self, fn, argv, wd):
@@ -427,7 +427,7 @@
         wd = self.translate(wd, False)
         fn = self.translate(os.path.abspath(fn), False)
         self.__sendCommand('%s%s|%s|%s\n' % \
-            (RequestRun, wd, fn, unicode(Utilities.parseOptionString(argv))))
+            (RequestRun, wd, fn, str(Utilities.parseOptionString(argv))))
         
     def remoteCoverage(self, fn, argv, wd, erase = False):
         """
@@ -592,7 +592,7 @@
         @param framenr framenumber of the variables to retrieve (int)
         """
         self.__sendCommand('%s%d, %d, %s\n' % \
-            (RequestVariables, framenr, scope, unicode(filter)))
+            (RequestVariables, framenr, scope, str(filter)))
         
     def remoteClientVariable(self, scope, filter, var, framenr = 0):
         """
@@ -604,7 +604,7 @@
         @param framenr framenumber of the variables to retrieve (int)
         """
         self.__sendCommand('%s%s, %d, %d, %s\n' % \
-            (RequestVariable, unicode(var), framenr, scope, str(filter)))
+            (RequestVariable, str(var), framenr, scope, str(filter)))
         
     def remoteClientSetFilter(self, scope, filter):
         """
@@ -685,16 +685,15 @@
         while self.qsock and self.qsock.canReadLine():
             qs = self.qsock.readLine()
             if self.codec is not None:
-                us = self.codec.fromUnicode(unicode(qs))
+                line = self.codec.toUnicode(qs)
             else:
-                us = qs
-            line = str(us)
+                line = bytes(qs).decode()
             if line.endswith(EOT):
                 line = line[:-len(EOT)]
                 if not line:
                     continue
             
-##            print "Server: ", line          ##debug
+##            print("Server: ", line)          ##debug
             
             eoc = line.find('<') + 1
             

eric ide

mercurial