def getobjnamelist(txt):
    """get the list of object names from the text of the idd file"""
    txtc = eplusdata.removecomment(txt, '!')
    txtsc = eplusdata.removecomment(txtc, '\\')
    lines = txtsc.splitlines()
    lines = [line.strip()  for line in lines]
    lines = [line for line in lines if line != '']
    txtsc = '\n'.join(lines)
    blocks = txtsc.split(';')
    blocks1 = [block.split(',') for block in blocks]
    names = [block[0].strip() for block in blocks1]
    names = [name.upper() for name in names if name != '']
    return names
def getcommlst(txt):
    """get commlst
    txt is the text of the idd file"""
    txtc = eplusdata.removecomment(txt, '!')
    iobj = getobjlines(txtc)

    lines = txtc.splitlines()
    objblock =[]
    for k, (i, obj) in enumerate(iobj):
        try:
            theblock = lines[iobj[k][0]:iobj[k+1][0]]
            objblock.append(theblock)
        except IndexError, e:
            theblock = lines[iobj[k][0]:]
            objblock.append(theblock)