def __init__(self, callable):
        self._callable = _get_callable(callable)
        self._cls = False

        if callable is not self._callable:
            is_cls = not inspect.isfunction(self._callable)
            is_cls = is_cls and ( not inspect.isbuiltin(self._callable) )
            is_cls = is_cls and (not inspect.isclass(self._callable))
            
            if is_cls:
                if ec._is_supported():
                    self._callable._streamsx_ec_op = ec._get_opc(self._callable)
                self._cls = True
                ec._callable_enter(self._callable)

        ec._clear_opc()
    def __init__(self, callable_, attributes=None):
        self._callable = _get_callable(callable_)
        self._cls = False
        self._attributes = attributes

        if callable_ is not self._callable:
            is_cls = not inspect.isfunction(self._callable)
            is_cls = is_cls and ( not inspect.isbuiltin(self._callable) )
            is_cls = is_cls and (not inspect.isclass(self._callable))
            
            if is_cls:
                if ec._is_supported():
                    self._callable._streamsx_ec_op = ec._get_opc(self._callable)
                self._cls = True
                ec._callable_enter(self._callable)
                if hasattr(self._callable, '_splpy_entered'):
                    self._splpy_entered = self._callable._splpy_entered

        ec._clear_opc()
Exemple #3
0
    def __init__(self, callable_, attributes=None):
        self._callable = _get_callable(callable_)
        self._cls = False
        self._attributes = attributes

        if callable_ is not self._callable:
            is_cls = not inspect.isfunction(self._callable)
            is_cls = is_cls and ( not inspect.isbuiltin(self._callable) )
            is_cls = is_cls and (not inspect.isclass(self._callable))
            
            if is_cls:
                if ec._is_supported():
                    self._callable._streamsx_ec_op = ec._get_opc(self._callable)
                self._cls = True
                ec._callable_enter(self._callable)
                if hasattr(self._callable, '_splpy_entered'):
                    self._splpy_entered = self._callable._splpy_entered

        ec._clear_opc()
Exemple #4
0
 def __init__(self,*args,**kwargs):
     super(_op_class, self).__init__(*args,**kwargs)
     if ec._is_supported():
         ec._save_opc(self)
     ec._callable_enter(self)
Exemple #5
0
 def __init__(self, *args, **kwargs):
     self.__splpy_instance = wrapped(*args, **kwargs)
     if ec._is_supported():
         ec._save_opc(self.__splpy_instance)
     ec._callable_enter(self.__splpy_instance)
Exemple #6
0
 def __init__(self,*args,**kwargs):
     self.__splpy_instance = wrapped(*args,**kwargs)
     if ec._is_supported():
         ec._save_opc(self.__splpy_instance)
     ec._callable_enter(self.__splpy_instance)