      ''' The Graphical User Interface '''
      def __init__(self, options, parser):
          self.gui = tk.Tk()
          self.opts = options
          self.parser = parser
          
          pathscript = path.realpath(path.dirname(sys.argv[0]))
          pathicons = path.join(pathscript, 'icons')
          self.icofolder = tk.PhotoImage(file=path.join(pathicons,'open_folder.png'))
          self.icoload = tk.PhotoImage(file=path.join(pathicons,'open_file.png'))
          self.icosave = tk.PhotoImage(file=path.join(pathicons,'save.png'))
          self.icoreset = tk.PhotoImage(file=path.join(pathicons,'reset.png'))
          self.icoclear = tk.PhotoImage(file=path.join(pathicons,'clear.png'))
  
          self.helptext = tk.StringVar()
          self.statustext = tk.StringVar()
          self.serializer = JSONSerializer
          self.filetypes=(('Faceswap files', '*.fsw'),  ('All files', '*.*'))
          self.task = FaceswapControl()
  
      def build_gui(self):
 
</s> remove         self.filetypes=(('Faceswap files', '*.fsw'),  ('All files', '*.*'))
        self.task = FaceswapControl()
 </s> add         self.filetypes = (('Faceswap files', '*.fsw'), ('All files', '*.*')) </s> remove     def build_gui(self):
        ''' Build the GUI '''
        self.gui.title('faceswap.py')
        self.menu()
        notebook = ttk.Notebook(self.gui)
        notebook.pack(fill=tk.BOTH, expand=True)
 </s> add         self.task = FaceswapControl(self, calling_file=calling_file)
        self.runningtask = False </s> remove class FaceswapGui(object):
    ''' The Graphical User Interface '''
    def __init__(self, options, parser):
        self.gui = tk.Tk()
 </s> add # An error will be thrown when importing tkinter for users without tkinter
# distribution packages or without an X-Console. Therefore if importing fails
# no attempt will be made to instantiate the gui.
try:
    import tkinter as tk
    from tkinter import ttk
    from tkinter import filedialog
    from tkinter import messagebox
    from tkinter import TclError
except ImportError:
    tk = None
    ttk = None
    filedialog = None
    messagebox = None
    TclError = None

class Utils(object):
    """ Inter-class object holding items that are required across classes """

    def __init__(self, options, calling_file="faceswap.py"): </s> remove     def bad_args(self, args):
        self.parser.print_help()
        exit(0)
 </s> add     def __init__(self, utils, calling_file="faceswap.py"):
        self.pathexecscript = os.path.join(PATHSCRIPT, calling_file)
        self.utils = utils </s> remove     def execute_script(self, options, command, parser, statustext):
        self.opts = options
 </s> add         self.command = None
        self.args = None
        self.process = None
        self.lenloss = 0

    def prepare(self, options, command):
        """ Prepare for running the subprocess """
        self.icons = dict()
        self.guitext = dict()
        self.actionbtns = dict()

        self.console = None
        self.debugconsole = False

      ''' The Graphical User Interface '''
      def __init__(self, options, parser):
          self.gui = tk.Tk()
          self.opts = options
        self.icons = dict()
        self.guitext = dict()
        self.actionbtns = dict()

        self.console = None
        self.debugconsole = False

        self.icons = dict()
        self.guitext = dict()
        self.actionbtns = dict()

        self.console = None
        self.debugconsole = False

        self.icons = dict()
        self.guitext = dict()
        self.actionbtns = dict()

        self.console = None
        self.debugconsole = False

        self.icons = dict()
        self.guitext = dict()
        self.actionbtns = dict()

        self.console = None
        self.debugconsole = False

        self.icons = dict()
        self.guitext = dict()
        self.actionbtns = dict()

        self.console = None
        self.debugconsole = False

        self.icons = dict()
        self.guitext = dict()
        self.actionbtns = dict()

        self.console = None
        self.debugconsole = False

        self.icons = dict()
        self.guitext = dict()
        self.actionbtns = dict()

        self.console = None
        self.debugconsole = False

        self.icons = dict()
        self.guitext = dict()
        self.actionbtns = dict()

        self.console = None
        self.debugconsole = False

        self.icons = dict()
        self.guitext = dict()
        self.actionbtns = dict()

        self.console = None
        self.debugconsole = False

        self.icons = dict()
        self.guitext = dict()
        self.actionbtns = dict()

        self.console = None
        self.debugconsole = False

        self.icons = dict()
        self.guitext = dict()
        self.actionbtns = dict()

        self.console = None
        self.debugconsole = False

        self.icons = dict()
        self.guitext = dict()
        self.actionbtns = dict()

        self.console = None
        self.debugconsole = False

          self.serializer = JSONSerializer
          self.filetypes=(('Faceswap files', '*.fsw'),  ('All files', '*.*'))
          self.task = FaceswapControl()
  
      def build_gui(self):
keep keep keep keep replace replace replace replace replace replace replace replace replace replace replace replace keep keep keep keep keep
 GUI v0.2.1b (#352)

* Code refactor

* Console Added

* Add graphing with matplotlib

* Add GUI preview support

* Improve import handling.

* Add GUI integration for tools.py (Launch tools.py with the gui command)

* Reformat to conform to PEP8.

* Add Tooltips, 

* Make panels user adjustable

* Fix convert.py Sharpen default value 
scripts/gui.py