def set_defaults():
 global dataset_conf_path, dataset_data_path, root_conf_path, root_data_path, user_conf_path, super_powers
 root_conf_path = '/etc/pylearn/'
 root_data_path = '/usr/share/pylearn/dataset/'
 user_conf_path = os.path.join(os.environ['HOME'], '.local/share/pylearn/')
 user_data_path = os.path.join(os.environ['HOME'], '.local/share/pylearn/dataset/')
 if has_super_powers():
  dataset_conf_path = root_conf_path
  dataset_data_path = root_data_path
  super_powers = True
 else:
  dataset_conf_path = user_conf_path
  dataset_data_path = user_data_path
  super_powers = False
 if (not os.path.exists(dataset_conf_path)):
  os.makedirs(dataset_conf_path)
 if (not os.path.exists(os.path.join(dataset_conf_path, dataset_sources))):
  atomic_update(os.path.join(dataset_web, dataset_sources), os.path.join(dataset_conf_path, dataset_sources), progress_bar)
 if (not os.path.exists(dataset_data_path)):
  os.makedirs(dataset_data_path)
 read_packages_sources()
 read_installed_packages_list()

def set_defaults ( ) : global dataset_conf_path , dataset_data_path , root_conf_path , root_data_path , user_conf_path , super_powers root_conf_path = '/etc/pylearn/' root_data_path = '/usr/share/pylearn/dataset/' user_conf_path = os . path . join ( os . environ [ 'HOME' ] , '.local/share/pylearn/' ) user_data_path = os . path . join ( os . environ [ 'HOME' ] , '.local/share/pylearn/dataset/' ) if has_super_powers ( ) : dataset_conf_path = root_conf_path dataset_data_path = root_data_path super_powers = True else : dataset_conf_path = user_conf_path dataset_data_path = user_data_path super_powers = False if ( not os . path . exists ( dataset_conf_path ) ) : os . makedirs ( dataset_conf_path ) if ( not os . path . exists ( os . path . join ( dataset_conf_path , dataset_sources ) ) ) : atomic_update ( os . path . join ( dataset_web , dataset_sources ) , os . path . join ( dataset_conf_path , dataset_sources ) , progress_bar ) if ( not os . path . exists ( dataset_data_path ) ) : os . makedirs ( dataset_data_path ) read_packages_sources ( ) read_installed_packages_list ( )
update options with default values .