# Path: libs/utils.py
# class Term(object):
# 
#     def __init__(self, name=None, keepterm=False, xterm_args=None, xterm_prg_name='x-terminal-emulator'):
#         self.name = name
#         self.keepterm = keepterm
#         self.xterm_args = xterm_args
#         self.xterm_prg_name = xterm_prg_name
# 
#     def start(self):
#         self.pipe_path = os.sep + os.path.join('tmp', 'fuddly_term_'+str(uuid.uuid4()))
#         if not os.path.exists(self.pipe_path):
#             os.mkfifo(self.pipe_path)
#         self.cmd = [self.xterm_prg_name]
#         if self.name is not None:
#             self.cmd.extend(['-title',self.name])
#         if self.xterm_args:
#             self.cmd.extend(self.xterm_args)
#         if self.keepterm:
#             self.cmd.append('--hold')
#         self.cmd.extend(['-e', 'tail -f {:s}'.format(self.pipe_path)])
#         self._p = None
# 
#     def _launch_term(self):
#         self._p = subprocess.Popen(self.cmd)
# 
#     def stop(self):
#         if not self.keepterm and self._p is not None and self._p.poll() is None:
#             self._p.kill()
#         self._p = None
#         try:
#             os.remove(self.pipe_path)
#         except FileNotFoundError:
#             pass
# 
#     def print(self, s, newline=False):
#         s += '\n' if newline else ''
#         if self._p is None or self._p.poll() is not None:
#             self._launch_term()
#         with open(self.pipe_path, "w") as input_desc:
#             input_desc.write(s)
# 
#     def print_nl(self, s):
#         self.print(s, newline=True)


import functools
import libs.debug_facility as dbg
from framework.knowledge.information import *
from libs.utils import Term

        Args:
            current_dm (:class:`framework.data_model.DataModel`): current loaded DataModel
            source (:class:`framework.knowledge.feedback_collector.FeedbackSource`): source of the feedback
            timestamp (datetime): date of reception of the feedback
            content (bytes): binary data to process
            status (int): negative status signify an error

        Returns:
            Info: a set of :class:`.information.Info` or only one
        """
        return None

    def estimate_last_data_impact_uniqueness(self):
        """
        *** To be overloaded ***

        Estimate the similarity of the consequences triggered by the current data sending
        from previous sending.
        Estimation can be computed with provided feedback.

        Returns:
            SimilarityMeasure: provide an estimation of impact similarity
        """
        return UNIQUE

    def _start(self):
        self._s = ''
        if self._new_window:
            nm = self.__class__.__name__ if self._new_window_title is None else self._new_window_title

# Path: libs/utils.py
# class Term(object):
# 
#     def __init__(self, name=None, keepterm=False, xterm_args=None, xterm_prg_name='x-terminal-emulator'):
#         self.name = name
#         self.keepterm = keepterm
#         self.xterm_args = xterm_args
#         self.xterm_prg_name = xterm_prg_name
# 
#     def start(self):
#         self.pipe_path = os.sep + os.path.join('tmp', 'fuddly_term_'+str(uuid.uuid4()))
#         if not os.path.exists(self.pipe_path):
#             os.mkfifo(self.pipe_path)
#         self.cmd = [self.xterm_prg_name]
#         if self.name is not None:
#             self.cmd.extend(['-title',self.name])
#         if self.xterm_args:
#             self.cmd.extend(self.xterm_args)
#         if self.keepterm:
#             self.cmd.append('--hold')
#         self.cmd.extend(['-e', 'tail -f {:s}'.format(self.pipe_path)])
#         self._p = None
# 
#     def _launch_term(self):
#         self._p = subprocess.Popen(self.cmd)
# 
#     def stop(self):
#         if not self.keepterm and self._p is not None and self._p.poll() is None:
#             self._p.kill()
#         self._p = None
#         try:
#             os.remove(self.pipe_path)
#         except FileNotFoundError:
#             pass
# 
#     def print(self, s, newline=False):
#         s += '\n' if newline else ''
#         if self._p is None or self._p.poll() is not None:
#             self._launch_term()
#         with open(self.pipe_path, "w") as input_desc:
#             input_desc.write(s)
# 
#     def print_nl(self, s):
#         self.print(s, newline=True)


# Path: framework/knowledge/feedback_handler.py
import functools
import libs.debug_facility as dbg
from framework.knowledge.information import *
from libs.utils import Term


        Args:
            current_dm (:class:`framework.data_model.DataModel`): current loaded DataModel
            source (:class:`framework.knowledge.feedback_collector.FeedbackSource`): source of the feedback
            timestamp (datetime): date of reception of the feedback
            content (bytes): binary data to process
            status (int): negative status signify an error

        Returns:
            Info: a set of :class:`.information.Info` or only one
        """
        return None

    def estimate_last_data_impact_uniqueness(self):
        """
        *** To be overloaded ***

        Estimate the similarity of the consequences triggered by the current data sending
        from previous sending.
        Estimation can be computed with provided feedback.

        Returns:
            SimilarityMeasure: provide an estimation of impact similarity
        """
        return UNIQUE

    def _start(self):
        self._s = ''
        if self._new_window:
            nm = self.__class__.__name__ if self._new_window_title is None else self._new_window_title

            self.term = Term(name=nm, xterm_prg_name=self._xterm_prg_name,