'Remove empty sections and then return 1 if parser has no sections
left, else return 0.'

def IsEmpty(self):

    self.RemoveEmptySections()
    if self.sections():
        return 0
    else:
        return 1
