def _do_path_update(path, update_path, key, name):
 path = op.abspath(path)
 if (update_path is None):
  if (get_config(key, '') != path):
   update_path = True
   if ('--update-dataset-path' in sys.argv):
    answer = 'y'
   else:
    msg = ('Do you want to set the path:\n    %s\nas the default %s dataset path in the mne-python config [y]/n? ' % (path, name))
    answer = input(msg)
   if (answer.lower() == 'n'):
    update_path = False
  else:
   update_path = False
 if (update_path is True):
  set_config(key, path, set_env=False)
 return path

def _do_path_update ( path , update_path , key , name ) : path = op . abspath ( path ) if ( update_path is None ) : if ( get_config ( key , '' ) != path ) : update_path = True if ( '--update-dataset-path' in sys . argv ) : answer = 'y' else : msg = ( 'Do you want to set the path:\n    %s\nas the default %s dataset path in the mne-python config [y]/n? ' % ( path , name ) ) answer = input ( msg ) if ( answer . lower ( ) == 'n' ) : update_path = False else : update_path = False if ( update_path is True ) : set_config ( key , path , set_env = False ) return path
helper to update path .