def parse_qiime_config_file(qiime_config_file):
 result = {}
 for line in qiime_config_file:
  line = line.strip()
  if ((not line) or line.startswith('#')):
   continue
  fields = line.split()
  param_id = fields[0]
  param_value = (expandvars(' '.join(fields[1:])) or None)
  result[param_id] = param_value
 return result

def parse_qiime_config_file ( qiime_config_file ) : result = { } for line in qiime_config_file : line = line . strip ( ) if ( ( not line ) or line . startswith ( '#' ) ) : continue fields = line . split ( ) param_id = fields [ 0 ] param_value = ( expandvars ( ' ' . join ( fields [ 1 : ] ) ) or None ) result [ param_id ] = param_value return result
parse lines in a qiime_config file .