code: def show_kernel_error(self, error):
          
          # Replace end of line chars with <br>
          eol = sourcecode.get_eol_chars(error)
          if eol:
              error = error.replace(eol, '<br>')
  
          # Don't break lines in hyphens
          # From https://stackoverflow.com/q/7691569/438386
          error = error.replace('-', '&#8209')
  
          # Create error page
          message = _("An error ocurred while starting the kernel")
          kernel_error_template = Template(KERNEL_ERROR)
          self.info_page = kernel_error_template.substitute(
              css_path=self.css_path,
              message=message,
              error=error)
  
          # Show error
          self.set_info_page()
          self.shellwidget.hide()
          self.infowidget.show()
  
          # Tell the client we're in error mode
          self.is_error_shown = True
docs: Show kernel initialization errors in infowidget.