Beispiel #1
0
    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()
Beispiel #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()
Beispiel #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)
Beispiel #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)
Beispiel #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)