def init_config():
 config = (os.path.dirname(__file__) + '/colorset/config')
 try:
  data = load_config(config)
  for d in data:
   c[d] = data[d]
 except:
  pass
 rainbow_config = ((os.path.expanduser('~') + os.sep) + '.rainbow_config.json')
 try:
  data = load_config(rainbow_config)
  for d in data:
   c[d] = data[d]
 except (IOError, ValueError) as e:
  c['USER_JSON_ERROR'] = str(e)
 theme_file = (((os.path.dirname(__file__) + '/colorset/') + c['THEME']) + '.json')
 try:
  data = load_config(theme_file)
  for d in data:
   c[d] = data[d]
 except:
  pass

def init_config ( ) : config = ( os . path . dirname ( __file__ ) + '/colorset/config' ) try : data = load_config ( config ) for d in data : c [ d ] = data [ d ] except : pass rainbow_config = ( ( os . path . expanduser ( '~' ) + os . sep ) + '.rainbow_config.json' ) try : data = load_config ( rainbow_config ) for d in data : c [ d ] = data [ d ] except ( IOError , ValueError ) as e : c [ 'USER_JSON_ERROR' ] = str ( e ) theme_file = ( ( ( os . path . dirname ( __file__ ) + '/colorset/' ) + c [ 'THEME' ] ) + '.json' ) try : data = load_config ( theme_file ) for d in data : c [ d ] = data [ d ] except : pass
init configuration .