  
          self.previewtrain[name][1] = ImageTk.PhotoImage(displayimg)
  
  
  class ConsoleOut(ttk.Frame):  # pylint: disable=too-many-ancestors
      """ The Console out section of the GUI """
  
      def __init__(self, parent, debug):
 
</s> remove         self.console.configure(state="disabled")
 </s> add  </s> remove         self.console = tk.Text(self)
 </s> add         self.console = ReadOnlyText(self) </s> remove         self.console.config(width=100, height=6, bg="gray90", fg="black", state="disabled")
 </s> add         self.console.config(width=100, height=6, bg="gray90", fg="black") </s> remove         self.console.configure(state="disabled")
 </s> add 
class ReadOnlyText(tk.Text):  # pylint: disable=too-many-ancestors
    """ A read only text widget that redirects a standard tk.Text widget's insert and delete
    attributes.
    Source: https://stackoverflow.com/questions/3842155
    """
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        self.redirector = WidgetRedirector(self)
        self.insert = self.redirector.register("insert", lambda *args, **kw: "break")
        self.delete = self.redirector.register("delete", lambda *args, **kw: "break")


  
          self.previewtrain[name][1] = ImageTk.PhotoImage(displayimg)
  
  
class ReadOnlyText(tk.Text):  # pylint: disable=too-many-ancestors
    """ A read only text widget that redirects a standard tk.Text widget's insert and delete
    attributes.
    Source: https://stackoverflow.com/questions/3842155
    """
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        self.redirector = WidgetRedirector(self)
        self.insert = self.redirector.register("insert", lambda *args, **kw: "break")
        self.delete = self.redirector.register("delete", lambda *args, **kw: "break")


  class ConsoleOut(ttk.Frame):  # pylint: disable=too-many-ancestors
      """ The Console out section of the GUI """
  
      def __init__(self, parent, debug):
keep keep keep add keep keep keep keep
 GUI: Make readonly console less buggy 
lib/gui/utils.py