55 cmd = json.dumps(commandDict) + "\n" |
55 cmd = json.dumps(commandDict) + "\n" |
56 self.__connection.sendall(cmd.encode("utf8", "backslashreplace")) |
56 self.__connection.sendall(cmd.encode("utf8", "backslashreplace")) |
57 |
57 |
58 def __receiveJson(self): |
58 def __receiveJson(self): |
59 """ |
59 """ |
60 Private method to receive a JSON encode command and data from the |
60 Private method to receive a JSON encoded command and data from the |
61 server. |
61 server. |
62 |
62 |
63 @return tuple containing the received command and a dictionary |
63 @return tuple containing the received command and a dictionary |
64 containing the associated data |
64 containing the associated data |
65 @rtype tuple of (str, dict) |
65 @rtype tuple of (str, dict) |