              if os.name == "nt":
                  logger.debug("Sending carriage return to process")
                  con_in = win32console.GetStdHandle(  # pylint:disable=c-extension-no-member
                      win32console.STD_INPUT_HANDLE)  # pylint:disable=c-extension-no-member
                  keypress = self.generate_windows_keypress("\n")
                  con_in.WriteConsoleInput([keypress])
              else:
                  logger.debug("Sending SIGINT to process")
                  process.send_signal(signal.SIGINT)
              while True:
 
</s> remove             timeout = self.config.user_config_dict.get("timeout", 120)
 </s> add             timeout = self._config.user_config_dict.get("timeout", 120) </s> remove     @staticmethod
    def generate_windows_keypress(character):
        """ Generate an 'Enter' key press to terminate Windows training """
 </s> add     @classmethod
    def _generate_windows_keypress(cls, character: str) -> bytes:
        """ Generate a Windows keypress

        Parameters
        ----------
        character: str
            The caracter to generate the keypress for

        Returns
        -------
        bytes
            The generated Windows keypress
        """ </s> remove                 output = self.process.stderr.readline()
 </s> add                 buff = self._process.stderr
                assert buff is not None
                output: str = buff.readline() </s> remove     def terminate_in_thread(self, command, process):
        """ Terminate the subprocess """
 </s> add         Parameters
        ----------
        command: str
            The command that is running

        process: :class:`subprocess.Popen`
            The running process

        Returns
        -------
        bool
            ``True`` when this function exits
        """
                keypress = self._generate_windows_keypress("\n")
              if os.name == "nt":
                  logger.debug("Sending carriage return to process")
                  con_in = win32console.GetStdHandle(  # pylint:disable=c-extension-no-member
                      win32console.STD_INPUT_HANDLE)  # pylint:disable=c-extension-no-member
                keypress = self._generate_windows_keypress("\n")
                  con_in.WriteConsoleInput([keypress])
              else:
                  logger.debug("Sending SIGINT to process")
                  process.send_signal(signal.SIGINT)
              while True:
keep keep keep keep replace keep keep keep keep keep
 bugfix: GUI force stdout/stderr reading to utf-8 
lib/gui/wrapper.py