          return False
      return True    
  
  def check_display(command):
      # Check whether there is a display to output the GUI '''
      if not environ.get('DISPLAY', None):
          if 'gui' in command:
              print ('Could not detect a display. The GUI has been disabled')
          return False
      return True
  
 
</s> remove from os import environ, path
 </s> add from os import path
    # 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':
          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':
    # 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
  
keep keep keep keep replace replace keep keep keep keep keep
 Fix GUI check for Windows non-use of DISPLAY environment variable (#338) 
scripts/gui.py