Helpviewer/Network/NetworkReply.py

changeset 12
1d8dd9706f46
parent 7
c679fb30c8f3
child 13
1af94a91f439
equal deleted inserted replaced
11:b0996e4a289e 12:1d8dd9706f46
56 56
57 @param maxlen maximum number of bytes to read (integer) 57 @param maxlen maximum number of bytes to read (integer)
58 @return string containing the data (string) 58 @return string containing the data (string)
59 """ 59 """
60 len_ = min(maxlen, self.__data.length()) 60 len_ = min(maxlen, self.__data.length())
61 buffer = str(self.__data[:len_]) 61 buffer = bytes(self.__data[:len_])
62 self.__data.remove(0, len_) 62 self.__data.remove(0, len_)
63 if self.__data.length() == 0: 63 if self.__data.length() == 0:
64 QTimer.singleShot(0, self, SIGNAL("finished()")) 64 QTimer.singleShot(0, self, SIGNAL("finished()"))
65 return buffer 65 return buffer

eric ide

mercurial