def fromString(cls, inputString): data = json.loads(inputString) args = { 'nodes': [] } for node in data: args['nodes'].append(Point.fromJson(json.dumps(node))) return cls(args)
def getPos(self): """Gets the position from server, and updates internal coordinates in Nav module. """ r = requests.get(Nav.HOST_ADDR + '/heartbeat/location') self.__model['currLoc'] = Point.fromJson(r.text)