def newNode(self, nodeClass, *args, **kwargs): if DEBUG: parentPipe, childPipe = DebugPipe() setConnectionNames(parentPipe, childPipe, 'manager', 'new child') else: parentPipe, childPipe = Pipe() process = Process(target=nodeClass(*args, **kwargs), args=(childPipe,)) process.parentPipe = parentPipe process.start() assert parentPipe.recv() == 'running', 'Node unresponsive' if DEBUG: setConnectionNames(parentPipe, childPipe, 'manager', str(process.pid)) parentPipe.send(process.pid) self.nodes[process.pid] = process