295 |
297 |
296 @param s text to be written (string) |
298 @param s text to be written (string) |
297 """ |
299 """ |
298 self.__checkMode('w') |
300 self.__checkMode('w') |
299 |
301 |
300 import json |
302 cmd = prepareJsonCommand("ClientOutput", { |
301 commandDict = { |
303 "text": s, |
302 "jsonrpc": "2.0", |
304 }) |
303 "method": "ClientOutput", |
|
304 "params": { |
|
305 "text": s, |
|
306 } |
|
307 } |
|
308 cmd = json.dumps(commandDict) + '\n' |
|
309 |
|
310 self.write_p(cmd) |
305 self.write_p(cmd) |
311 |
306 |
312 def write_p(self, s): |
307 def write_p(self, s): |
313 """ |
308 """ |
314 Public method to write a string to the file. |
309 Public method to write a string to the file. |