def get_user_config(config_file=None, default_config=False):
 if default_config:
  return copy.copy(DEFAULT_CONFIG)
 if (config_file and (config_file is not USER_CONFIG_PATH)):
  return get_config(config_file)
 try:
  env_config_file = os.environ[u'COOKIECUTTER_CONFIG']
 except KeyError:
  if os.path.exists(USER_CONFIG_PATH):
   return get_config(USER_CONFIG_PATH)
  else:
   return copy.copy(DEFAULT_CONFIG)
 else:
  return get_config(env_config_file)

def get_user_config ( config_file = None , default_config = False ) : if default_config : return copy . copy ( DEFAULT_CONFIG ) if ( config_file and ( config_file is not USER_CONFIG_PATH ) ) : return get_config ( config_file ) try : env_config_file = os . environ [ u'COOKIECUTTER_CONFIG' ] except KeyError : if os . path . exists ( USER_CONFIG_PATH ) : return get_config ( USER_CONFIG_PATH ) else : return copy . copy ( DEFAULT_CONFIG ) else : return get_config ( env_config_file )
return the user config as a dict .