7627:812ee8c0a91a | 7646:39e3db2b4936 |
---|---|
9 """ | 9 """ |
10 | 10 |
11 import socket | 11 import socket |
12 | 12 |
13 from DebugUtilities import prepareJsonCommand | 13 from DebugUtilities import prepareJsonCommand |
14 | |
15 try: | |
16 unicode | |
17 except NameError: | |
18 unicode = str | |
19 raw_input = input | |
20 | 14 |
21 | 15 |
22 def AsyncPendingWrite(file): | 16 def AsyncPendingWrite(file): |
23 """ | 17 """ |
24 Module function to check for data to be written. | 18 Module function to check for data to be written. |
178 @return the bytes read | 172 @return the bytes read |
179 @rtype str | 173 @rtype str |
180 """ | 174 """ |
181 self.__checkMode('r') | 175 self.__checkMode('r') |
182 | 176 |
183 buf = raw_input() | 177 buf = input() |
184 if size >= 0: | 178 if size >= 0: |
185 buf = buf[:size] | 179 buf = buf[:size] |
186 return buf | 180 return buf |
187 | 181 |
188 def readCommand(self): | 182 def readCommand(self): |
276 @return one line read | 270 @return one line read |
277 @rtype str | 271 @rtype str |
278 """ | 272 """ |
279 self.__checkMode('r') | 273 self.__checkMode('r') |
280 | 274 |
281 line = raw_input() + '\n' | 275 line = input() + '\n' |
282 if sizehint >= 0: | 276 if sizehint >= 0: |
283 line = line[:sizehint] | 277 line = line[:sizehint] |
284 return line | 278 return line |
285 | 279 |
286 def seekable(self): | 280 def seekable(self): |
368 | 362 |
369 @param lines list of texts to be written | 363 @param lines list of texts to be written |
370 @type list of str | 364 @type list of str |
371 """ | 365 """ |
372 self.write("".join(lines)) | 366 self.write("".join(lines)) |
373 | |
374 # | |
375 # eflag: noqa = M702 |