(self, response_type, data)
Process a response recieved from the server.

        This will be one of:
        - ``RESULT`` - A pathfinding result. Call the first queued callback.
        - ``ERROR`` - An unexpected exception was caught and the server has exited.
          Relay the traceback to the user for debugging.
Process a response recieved from the server.
Process a response recieved from the server .
def handle_response(self, response_type, data):
        """
        Process a response recieved from the server.

        This will be one of:
        - ``RESULT`` - A pathfinding result. Call the first queued callback.
        - ``ERROR`` - An unexpected exception was caught and the server has exited.
          Relay the traceback to the user for debugging.
        """
        if response_type == "RESULT":
            # Get the first callback function and pass the result to it
            self.callback(data)
            del self.callback
        elif response_type == "ERROR":
            raise Exception("Pathfinding server encountered an exception:\n" + data)
        else:
            raise Exception("Received an unexpected response " + response_type)
def handle_response ( self , response_type , data ) : if response_type == "RESULT" : # Get the first callback function and pass the result to it self . callback ( data ) del self . callback elif response_type == "ERROR" : raise Exception ( "Pathfinding server encountered an exception:\n" + data ) else : raise Exception ( "Received an unexpected response " + response_type )