--- a/DebugClients/Python/AsyncFile.py Mon Sep 19 22:47:52 2016 +0200 +++ b/DebugClients/Python/AsyncFile.py Sat Sep 24 22:52:13 2016 +0200 @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# Copyright (c) 2009 - 2016 Detlev Offenbach <detlev@die-offenbachs.de> +# Copyright (c) 2002 - 2016 Detlev Offenbach <detlev@die-offenbachs.de> # """ @@ -12,6 +12,12 @@ from DebugUtilities import prepareJsonCommand +try: + unicode +except NameError: + unicode = str + raw_input = input + def AsyncPendingWrite(file): """ @@ -51,7 +57,7 @@ self.nWriteErrors = 0 self.encoding = "utf-8" - self.wpending = '' + self.wpending = unicode('') def __checkMode(self, mode): """ @@ -85,7 +91,7 @@ except socket.error: self.nWriteErrors += 1 if self.nWriteErrors > self.maxtries: - self.wpending = '' # delete all output + self.wpending = unicode('') # delete all output def pendingWrite(self): """ @@ -163,7 +169,7 @@ """ self.__checkMode('r') - buf = input() + buf = raw_input() if size >= 0: buf = buf[:size] return buf @@ -237,7 +243,7 @@ """ self.__checkMode('r') - line = input() + '\n' + line = raw_input() + '\n' if sizehint >= 0: line = line[:sizehint] return line