def _create_formatters(cp):
 flist = cp.get('formatters', 'keys')
 if (not len(flist)):
  return {}
 flist = string.split(flist, ',')
 flist = _strip_spaces(flist)
 formatters = {}
 for form in flist:
  sectname = ('formatter_%s' % form)
  opts = cp.options(sectname)
  if ('format' in opts):
   fs = cp.get(sectname, 'format', 1)
  else:
   fs = None
  if ('datefmt' in opts):
   dfs = cp.get(sectname, 'datefmt', 1)
  else:
   dfs = None
  c = logging.Formatter
  if ('class' in opts):
   class_name = cp.get(sectname, 'class')
   if class_name:
    c = _resolve(class_name)
  f = c(fs, dfs)
  formatters[form] = f
 return formatters

def _create_formatters ( cp ) : flist = cp . get ( 'formatters' , 'keys' ) if ( not len ( flist ) ) : return { } flist = string . split ( flist , ',' ) flist = _strip_spaces ( flist ) formatters = { } for form in flist : sectname = ( 'formatter_%s' % form ) opts = cp . options ( sectname ) if ( 'format' in opts ) : fs = cp . get ( sectname , 'format' , 1 ) else : fs = None if ( 'datefmt' in opts ) : dfs = cp . get ( sectname , 'datefmt' , 1 ) else : dfs = None c = logging . Formatter if ( 'class' in opts ) : class_name = cp . get ( sectname , 'class' ) if class_name : c = _resolve ( class_name ) f = c ( fs , dfs ) formatters [ form ] = f return formatters
create and return formatters .