def __connect(self): ''' Connect oneself to the plasm. ''' plasm = ecto.Plasm() connections = self.connections() for x in connections: if not getattr(x, '__iter__', False): plasm.insert(x) else: plasm.connect(x) self.__impl = ecto.create_black_box(plasm, niter=self.niter, parameters=self.__params._tendrils, inputs=self.__inputs._tendrils, outputs=self.__outputs._tendrils)
def __connect(self): """ Connect oneself to the plasm. """ plasm = ecto.Plasm() try: connections = self.connections(self.__params) except Exception as e: raise BlackBoxError('Got error "%s" when calling connections on "%s"' % (str(e), str(self))) if not connections: raise BlackBoxError("Your BlackBox has empty connections") for x in connections: if not getattr(x, "__iter__", False): plasm.insert(x) else: plasm.connect(x) self.__impl = ecto.create_black_box( plasm, niter=self.niter, parameters=self.__params, inputs=self.__inputs, outputs=self.__outputs )
def __connect(self): ''' Connect oneself to the plasm. ''' plasm = ecto.Plasm() try: connections = self.connections(self.__params) except Exception as e: raise BlackBoxError('Got error "%s" when calling connections on "%s"' % (str(e), str(self))) if not connections: raise BlackBoxError('Your BlackBox has empty connections') for x in connections: if not getattr(x, '__iter__', False): plasm.insert(x) else: plasm.connect(x) self.__impl = ecto.create_black_box(plasm, niter=self.niter, parameters=self.__params, inputs=self.__inputs, outputs=self.__outputs)