def readconfig(cfgdict):
 default_cfg = 'turtle.cfg'
 cfgdict1 = {}
 cfgdict2 = {}
 if isfile(default_cfg):
  cfgdict1 = config_dict(default_cfg)
 if ('importconfig' in cfgdict1):
  default_cfg = ('turtle_%s.cfg' % cfgdict1['importconfig'])
 try:
  (head, tail) = split(__file__)
  cfg_file2 = join(head, default_cfg)
 except:
  cfg_file2 = ''
 if isfile(cfg_file2):
  cfgdict2 = config_dict(cfg_file2)
 _CFG.update(cfgdict2)
 _CFG.update(cfgdict1)

def readconfig ( cfgdict ) : default_cfg = 'turtle.cfg' cfgdict1 = { } cfgdict2 = { } if isfile ( default_cfg ) : cfgdict1 = config_dict ( default_cfg ) if ( 'importconfig' in cfgdict1 ) : default_cfg = ( 'turtle_%s.cfg' % cfgdict1 [ 'importconfig' ] ) try : ( head , tail ) = split ( __file__ ) cfg_file2 = join ( head , default_cfg ) except : cfg_file2 = '' if isfile ( cfg_file2 ) : cfgdict2 = config_dict ( cfg_file2 ) _CFG . update ( cfgdict2 ) _CFG . update ( cfgdict1 )
read config-files .