          self.bind_help(btnexecute, 'Run the {} script'.format(title))
  
      def add_util_buttons(self, frame, title):
          ''' Add the section utility buttons '''
          command = title.lower()
          title = title.capitalize()
  
          utilframe = tk.Frame(frame)
          utilframe.pack(side=tk.TOP, pady=(5,0))
  
          btnload = tk.Button(utilframe, image=self.icofile, height=16, width=16, command=lambda: self.load_config(command))
          btnload.pack(padx=2, pady=2, side=tk.LEFT)
          self.bind_help(btnload, 'Load existing {} config'.format(title))
  
          btnsave = tk.Button(utilframe, image=self.icosave, height=16, width=16, command=lambda: self.save_config(command))
          btnsave.pack(padx=2, pady=2, side=tk.LEFT)
          self.bind_help(btnsave, 'Save {} config'.format(title))
  
          btnreset = tk.Button(utilframe, image=self.icoreset, height=16, width=16, command=lambda: self.reset_config(command))
          btnreset.pack(padx=2, pady=2, side=tk.RIGHT)
          self.bind_help(btnreset, 'Reset {} config to default'.format(title))
  
          btnclear = tk.Button(utilframe, image=self.icoclear, height=16, width=16, command=lambda: self.clear_config(command))
          btnclear.pack(padx=2, pady=2, side=tk.RIGHT)
          self.bind_help(btnclear, 'Clear all entries for {} config'.format(title))
  
      def add_status_section(self, frame):
          ''' Build the info text section page '''
          statusframe = tk.Frame(frame)
          statusframe.pack(side=tk.BOTTOM, pady=(5,0))
 
</s> remove     def add_util_buttons(self, frame, title):
 </s> add     def add_util_buttons(self, frame): </s> remove         btnexecute = tk.Button(actframe, text=title, height=2, width=12, command=lambda: self.execute_script(command))
        btnexecute.pack()
        self.bind_help(btnexecute, 'Run the {} script'.format(title))
 </s> add         btnexecute = tk.Button( actframe,
                                text=self.title,
                                height=2,
                                width=12,
                                command=lambda: self.gui.execute_task(self.command))
        btnexecute.pack(side=tk.TOP)
        self.gui.bind_help(btnexecute, 'Run the {} script'.format(self.title)) </s> remove         actframe.pack(fill=tk.X, side=tk.BOTTOM, pady=(15, 0))
 </s> add         actframe.pack(fill=tk.X, side=tk.TOP, pady=(15, 0)) </s> remove         statusframe.pack(side=tk.BOTTOM, pady=(5,0))
 </s> add         statusframe.pack(side=tk.TOP, pady=(5,0)) </s> remove         command = title.lower()
        title = title.capitalize()

 </s> add 
        utlframe = tk.Frame(frame)
        utlframe.pack(side=tk.TOP, pady=(5,0))

        for utl in ('load', 'save', 'clear', 'reset'):
            img = getattr(self.gui, 'ico' + utl)
            action = getattr(self.gui, utl + '_config')
            btnutl = tk.Button( utlframe,
                                height=16,
                                width=16,
                                image=img,
                                command=lambda cmd=action: cmd(self.command))
            btnutl.pack(padx=2, pady=2, side=tk.LEFT)
            self.gui.bind_help(btnutl, utl.capitalize() + ' ' + self.title + ' config')
          self.bind_help(btnexecute, 'Run the {} script'.format(title))
  
      def add_util_buttons(self, frame, title):
          ''' Add the section utility buttons '''
        utlframe = tk.Frame(frame)
        utlframe.pack(side=tk.TOP, pady=(5,0))

        for utl in ('load', 'save', 'clear', 'reset'):
            img = getattr(self.gui, 'ico' + utl)
            action = getattr(self.gui, utl + '_config')
            btnutl = tk.Button( utlframe,
                                height=16,
                                width=16,
                                image=img,
                                command=lambda cmd=action: cmd(self.command))
            btnutl.pack(padx=2, pady=2, side=tk.LEFT)
            self.gui.bind_help(btnutl, utl.capitalize() + ' ' + self.title + ' config')
        utlframe = tk.Frame(frame)
        utlframe.pack(side=tk.TOP, pady=(5,0))

        for utl in ('load', 'save', 'clear', 'reset'):
            img = getattr(self.gui, 'ico' + utl)
            action = getattr(self.gui, utl + '_config')
            btnutl = tk.Button( utlframe,
                                height=16,
                                width=16,
                                image=img,
                                command=lambda cmd=action: cmd(self.command))
            btnutl.pack(padx=2, pady=2, side=tk.LEFT)
            self.gui.bind_help(btnutl, utl.capitalize() + ' ' + self.title + ' config')
        utlframe = tk.Frame(frame)
        utlframe.pack(side=tk.TOP, pady=(5,0))

        for utl in ('load', 'save', 'clear', 'reset'):
            img = getattr(self.gui, 'ico' + utl)
            action = getattr(self.gui, utl + '_config')
            btnutl = tk.Button( utlframe,
                                height=16,
                                width=16,
                                image=img,
                                command=lambda cmd=action: cmd(self.command))
            btnutl.pack(padx=2, pady=2, side=tk.LEFT)
            self.gui.bind_help(btnutl, utl.capitalize() + ' ' + self.title + ' config')
        utlframe = tk.Frame(frame)
        utlframe.pack(side=tk.TOP, pady=(5,0))

        for utl in ('load', 'save', 'clear', 'reset'):
            img = getattr(self.gui, 'ico' + utl)
            action = getattr(self.gui, utl + '_config')
            btnutl = tk.Button( utlframe,
                                height=16,
                                width=16,
                                image=img,
                                command=lambda cmd=action: cmd(self.command))
            btnutl.pack(padx=2, pady=2, side=tk.LEFT)
            self.gui.bind_help(btnutl, utl.capitalize() + ' ' + self.title + ' config')
        utlframe = tk.Frame(frame)
        utlframe.pack(side=tk.TOP, pady=(5,0))

        for utl in ('load', 'save', 'clear', 'reset'):
            img = getattr(self.gui, 'ico' + utl)
            action = getattr(self.gui, utl + '_config')
            btnutl = tk.Button( utlframe,
                                height=16,
                                width=16,
                                image=img,
                                command=lambda cmd=action: cmd(self.command))
            btnutl.pack(padx=2, pady=2, side=tk.LEFT)
            self.gui.bind_help(btnutl, utl.capitalize() + ' ' + self.title + ' config')
        utlframe = tk.Frame(frame)
        utlframe.pack(side=tk.TOP, pady=(5,0))

        for utl in ('load', 'save', 'clear', 'reset'):
            img = getattr(self.gui, 'ico' + utl)
            action = getattr(self.gui, utl + '_config')
            btnutl = tk.Button( utlframe,
                                height=16,
                                width=16,
                                image=img,
                                command=lambda cmd=action: cmd(self.command))
            btnutl.pack(padx=2, pady=2, side=tk.LEFT)
            self.gui.bind_help(btnutl, utl.capitalize() + ' ' + self.title + ' config')
        utlframe = tk.Frame(frame)
        utlframe.pack(side=tk.TOP, pady=(5,0))

        for utl in ('load', 'save', 'clear', 'reset'):
            img = getattr(self.gui, 'ico' + utl)
            action = getattr(self.gui, utl + '_config')
            btnutl = tk.Button( utlframe,
                                height=16,
                                width=16,
                                image=img,
                                command=lambda cmd=action: cmd(self.command))
            btnutl.pack(padx=2, pady=2, side=tk.LEFT)
            self.gui.bind_help(btnutl, utl.capitalize() + ' ' + self.title + ' config')
        utlframe = tk.Frame(frame)
        utlframe.pack(side=tk.TOP, pady=(5,0))

        for utl in ('load', 'save', 'clear', 'reset'):
            img = getattr(self.gui, 'ico' + utl)
            action = getattr(self.gui, utl + '_config')
            btnutl = tk.Button( utlframe,
                                height=16,
                                width=16,
                                image=img,
                                command=lambda cmd=action: cmd(self.command))
            btnutl.pack(padx=2, pady=2, side=tk.LEFT)
            self.gui.bind_help(btnutl, utl.capitalize() + ' ' + self.title + ' config')
        utlframe = tk.Frame(frame)
        utlframe.pack(side=tk.TOP, pady=(5,0))

        for utl in ('load', 'save', 'clear', 'reset'):
            img = getattr(self.gui, 'ico' + utl)
            action = getattr(self.gui, utl + '_config')
            btnutl = tk.Button( utlframe,
                                height=16,
                                width=16,
                                image=img,
                                command=lambda cmd=action: cmd(self.command))
            btnutl.pack(padx=2, pady=2, side=tk.LEFT)
            self.gui.bind_help(btnutl, utl.capitalize() + ' ' + self.title + ' config')
        utlframe = tk.Frame(frame)
        utlframe.pack(side=tk.TOP, pady=(5,0))

        for utl in ('load', 'save', 'clear', 'reset'):
            img = getattr(self.gui, 'ico' + utl)
            action = getattr(self.gui, utl + '_config')
            btnutl = tk.Button( utlframe,
                                height=16,
                                width=16,
                                image=img,
                                command=lambda cmd=action: cmd(self.command))
            btnutl.pack(padx=2, pady=2, side=tk.LEFT)
            self.gui.bind_help(btnutl, utl.capitalize() + ' ' + self.title + ' config')
        utlframe = tk.Frame(frame)
        utlframe.pack(side=tk.TOP, pady=(5,0))

        for utl in ('load', 'save', 'clear', 'reset'):
            img = getattr(self.gui, 'ico' + utl)
            action = getattr(self.gui, utl + '_config')
            btnutl = tk.Button( utlframe,
                                height=16,
                                width=16,
                                image=img,
                                command=lambda cmd=action: cmd(self.command))
            btnutl.pack(padx=2, pady=2, side=tk.LEFT)
            self.gui.bind_help(btnutl, utl.capitalize() + ' ' + self.title + ' config')
        utlframe = tk.Frame(frame)
        utlframe.pack(side=tk.TOP, pady=(5,0))

        for utl in ('load', 'save', 'clear', 'reset'):
            img = getattr(self.gui, 'ico' + utl)
            action = getattr(self.gui, utl + '_config')
            btnutl = tk.Button( utlframe,
                                height=16,
                                width=16,
                                image=img,
                                command=lambda cmd=action: cmd(self.command))
            btnutl.pack(padx=2, pady=2, side=tk.LEFT)
            self.gui.bind_help(btnutl, utl.capitalize() + ' ' + self.title + ' config')
        utlframe = tk.Frame(frame)
        utlframe.pack(side=tk.TOP, pady=(5,0))

        for utl in ('load', 'save', 'clear', 'reset'):
            img = getattr(self.gui, 'ico' + utl)
            action = getattr(self.gui, utl + '_config')
            btnutl = tk.Button( utlframe,
                                height=16,
                                width=16,
                                image=img,
                                command=lambda cmd=action: cmd(self.command))
            btnutl.pack(padx=2, pady=2, side=tk.LEFT)
            self.gui.bind_help(btnutl, utl.capitalize() + ' ' + self.title + ' config')
        utlframe = tk.Frame(frame)
        utlframe.pack(side=tk.TOP, pady=(5,0))

        for utl in ('load', 'save', 'clear', 'reset'):
            img = getattr(self.gui, 'ico' + utl)
            action = getattr(self.gui, utl + '_config')
            btnutl = tk.Button( utlframe,
                                height=16,
                                width=16,
                                image=img,
                                command=lambda cmd=action: cmd(self.command))
            btnutl.pack(padx=2, pady=2, side=tk.LEFT)
            self.gui.bind_help(btnutl, utl.capitalize() + ' ' + self.title + ' config')
        utlframe = tk.Frame(frame)
        utlframe.pack(side=tk.TOP, pady=(5,0))

        for utl in ('load', 'save', 'clear', 'reset'):
            img = getattr(self.gui, 'ico' + utl)
            action = getattr(self.gui, utl + '_config')
            btnutl = tk.Button( utlframe,
                                height=16,
                                width=16,
                                image=img,
                                command=lambda cmd=action: cmd(self.command))
            btnutl.pack(padx=2, pady=2, side=tk.LEFT)
            self.gui.bind_help(btnutl, utl.capitalize() + ' ' + self.title + ' config')
        utlframe = tk.Frame(frame)
        utlframe.pack(side=tk.TOP, pady=(5,0))

        for utl in ('load', 'save', 'clear', 'reset'):
            img = getattr(self.gui, 'ico' + utl)
            action = getattr(self.gui, utl + '_config')
            btnutl = tk.Button( utlframe,
                                height=16,
                                width=16,
                                image=img,
                                command=lambda cmd=action: cmd(self.command))
            btnutl.pack(padx=2, pady=2, side=tk.LEFT)
            self.gui.bind_help(btnutl, utl.capitalize() + ' ' + self.title + ' config')
        utlframe = tk.Frame(frame)
        utlframe.pack(side=tk.TOP, pady=(5,0))

        for utl in ('load', 'save', 'clear', 'reset'):
            img = getattr(self.gui, 'ico' + utl)
            action = getattr(self.gui, utl + '_config')
            btnutl = tk.Button( utlframe,
                                height=16,
                                width=16,
                                image=img,
                                command=lambda cmd=action: cmd(self.command))
            btnutl.pack(padx=2, pady=2, side=tk.LEFT)
            self.gui.bind_help(btnutl, utl.capitalize() + ' ' + self.title + ' config')
        utlframe = tk.Frame(frame)
        utlframe.pack(side=tk.TOP, pady=(5,0))

        for utl in ('load', 'save', 'clear', 'reset'):
            img = getattr(self.gui, 'ico' + utl)
            action = getattr(self.gui, utl + '_config')
            btnutl = tk.Button( utlframe,
                                height=16,
                                width=16,
                                image=img,
                                command=lambda cmd=action: cmd(self.command))
            btnutl.pack(padx=2, pady=2, side=tk.LEFT)
            self.gui.bind_help(btnutl, utl.capitalize() + ' ' + self.title + ' config')
        utlframe = tk.Frame(frame)
        utlframe.pack(side=tk.TOP, pady=(5,0))

        for utl in ('load', 'save', 'clear', 'reset'):
            img = getattr(self.gui, 'ico' + utl)
            action = getattr(self.gui, utl + '_config')
            btnutl = tk.Button( utlframe,
                                height=16,
                                width=16,
                                image=img,
                                command=lambda cmd=action: cmd(self.command))
            btnutl.pack(padx=2, pady=2, side=tk.LEFT)
            self.gui.bind_help(btnutl, utl.capitalize() + ' ' + self.title + ' config')
        utlframe = tk.Frame(frame)
        utlframe.pack(side=tk.TOP, pady=(5,0))

        for utl in ('load', 'save', 'clear', 'reset'):
            img = getattr(self.gui, 'ico' + utl)
            action = getattr(self.gui, utl + '_config')
            btnutl = tk.Button( utlframe,
                                height=16,
                                width=16,
                                image=img,
                                command=lambda cmd=action: cmd(self.command))
            btnutl.pack(padx=2, pady=2, side=tk.LEFT)
            self.gui.bind_help(btnutl, utl.capitalize() + ' ' + self.title + ' config')
        utlframe = tk.Frame(frame)
        utlframe.pack(side=tk.TOP, pady=(5,0))

        for utl in ('load', 'save', 'clear', 'reset'):
            img = getattr(self.gui, 'ico' + utl)
            action = getattr(self.gui, utl + '_config')
            btnutl = tk.Button( utlframe,
                                height=16,
                                width=16,
                                image=img,
                                command=lambda cmd=action: cmd(self.command))
            btnutl.pack(padx=2, pady=2, side=tk.LEFT)
            self.gui.bind_help(btnutl, utl.capitalize() + ' ' + self.title + ' config')
  
      def add_status_section(self, frame):
          ''' Build the info text section page '''
          statusframe = tk.Frame(frame)
          statusframe.pack(side=tk.BOTTOM, pady=(5,0))
keep keep keep keep replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace keep keep keep keep keep
 GUI v0.1.0a (#336)

* Code clean up

* Code refactor

* bugfix: Find paths to icons when launched from outside faceswap dir

* Bugfix: Disable GUI if TkInter app not available

* BugFix: Disable GUI if $DISPLAY not detected

* Minor code ammends

* Code Refactor

* DISPLAY check fix 
scripts/gui.py