clipspy-1.0.0/clips/classes.py
def restore_instances(self, instances: str) -> int:
        """Restore a set of instances into the CLIPS data base.

        Equivalent to the CLIPS (restore-instances) function.

        Instances can be passed as a set of strings or as a file.

        """
        instances = instances.encode()

        if os.path.exists(instances):
            ret = lib.RestoreInstances(self._env, instances)
            if ret == -1:
                raise CLIPSError(self._env)
        else:
            ret = lib.RestoreInstancesFromString(
                self._env, instances, len(instances))
            if ret == -1:
                raise CLIPSError(self._env)

        return ret
Restore a set of instances into the CLIPS data base.

        Equivalent to the CLIPS (restore-instances) function.

        Instances can be passed as a set of strings or as a file.

        
Restore a set of instances into the CLIPS data base.
Equivalent to the CLIPS (restore-instances) function.

Instances can be passed as a set of strings or as a file.
Restore a set of instances into the CLIPS data base . Equivalent to the CLIPS ( restore - instances ) function . Instances can be passed as a set of strings or as a file .
def restore_instances(self, instances: str) -> int:
        instances = instances.encode()
        if os.path.exists(instances):
            ret = lib.RestoreInstances(self._env, instances)
            if ret == -1:
                raise CLIPSError(self._env)
        else:
            ret = lib.RestoreInstancesFromString(
                self._env, instances, len(instances))
            if ret == -1:
                raise CLIPSError(self._env)
        return ret
def restore_instances ( self , instances : str ) -> int : instances = instances . encode ( ) if os . path . exists ( instances ) : ret = lib . RestoreInstances ( self . _env , instances ) if ret == - 1 : raise CLIPSError ( self . _env ) else : ret = lib . RestoreInstancesFromString ( self . _env , instances , len ( instances ) ) if ret == - 1 : raise CLIPSError ( self . _env ) return ret
Restore a set of instances into the CLIPS data base.
Restore a set of instances into the CLIPS data base .
"""Restore a set of instances into the CLIPS data base.

        Equivalent to the CLIPS (restore-instances) function.

        Instances can be passed as a set of strings or as a file.

        """
self
instances
str