def restore_instances(self, instances):
        """Restore a set of instances into the CLIPS data base.

        The Python equivalent of the CLIPS restore-instances command.

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

        """
        instances = instances.encode()

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

        return ret
def restore_instances ( self , instances ) : instances = instances . encode ( ) if os . path . exists ( instances ) : ret = lib . EnvRestoreInstances ( self . _env , instances ) if ret == - 1 : raise CLIPSError ( self . _env ) else : ret = lib . EnvRestoreInstancesFromString ( self . _env , instances , - 1 ) if ret == - 1 : raise CLIPSError ( self . _env ) return ret
Restore a set of instances into the CLIPS data base.

        The Python equivalent of the CLIPS restore-instances command.

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