      if face_recognition is None:
          import face_recognition
  
  def import_FaceLandmarksExtractor():
      ''' Import the FaceLandmarksExtractor module only when it is required '''
      global FaceLandmarksExtractor
      if FaceLandmarksExtractor is None:
          import lib.FaceLandmarksExtractor
          FaceLandmarksExtractor = lib.FaceLandmarksExtractor
  
 
</s> remove     ''' Import the face_recognition module only when it is required '''
 </s> add     """ Import the face_recognition module only when it is required """ </s> remove # DLIB is a GPU Memory hog, so the following modules should only be imported when required
 </s> add # DLIB is a GPU Memory hog, so the following modules should only be imported
# when required </s> remove if sys.version_info[0] < 3:
    raise Exception("This program requires at least python3.2")
if sys.version_info[0] == 3 and sys.version_info[1] < 2:
    raise Exception("This program requires at least python3.2")
 </s> add  </s> remove import re
 </s> add from lib.cli import FullPaths </s> remove # Users without tkinter distrubtion packages or without an X-Console will error out
# importing tkinter. Therefore run a check on these and only import if required 
tk = None
ttk = None
filedialog = None

def import_tkinter(command):
    ''' Perform checks when importing tkinter module to ensure that GUI will load '''
    global tk
    global ttk
    global filedialog
    try:
        import tkinter
        from tkinter import ttk
        from tkinter import filedialog
        tk = tkinter
    except ImportError:
        if 'gui' in command:
            print(  'It looks like TkInter isn''t installed for your OS, so the GUI has been '
                    'disabled. To enable the GUI please install the TkInter application.\n'
                    'You can try:\n'
                    '  Windows/macOS:      Install ActiveTcl Community Edition from '
                    'www.activestate.com\n'
                    '  Ubuntu/Mint/Debian: sudo apt install python3-tk\n'
                    '  Arch:               sudo pacman -S tk\n'
                    '  CentOS/Redhat:      sudo yum install tkinter\n'
                    '  Fedora:             sudo dnf install python3-tkinter\n')
        return False
    return True    

def check_display(command):
    # Check whether there is a display to output the GUI. If running on Windows
    # then assume not running in headless mode
    if not os.environ.get('DISPLAY', None) and os.name != 'nt':
        if 'gui' in command:
            print ('Could not detect a display. The GUI has been disabled')
        return False
    return True
 </s> add PATHSCRIPT = os.path.realpath(os.path.dirname(sys.argv[0]))
    """ Import the FaceLandmarksExtractor module only when it is required """
      if face_recognition is None:
          import face_recognition
  
  def import_FaceLandmarksExtractor():
    """ Import the FaceLandmarksExtractor module only when it is required """
      global FaceLandmarksExtractor
      if FaceLandmarksExtractor is None:
          import lib.FaceLandmarksExtractor
          FaceLandmarksExtractor = lib.FaceLandmarksExtractor
  
keep keep keep keep 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 
tools/sort.py