Read a line from a file string and check it isn't either empty or commented before returning.

def read_line(self, fid):
        """Read a line from a file string and check it isn't either empty or commented before returning."""
        lin = '#'
        while lin[0] == '#':
            lin = fid.readline().strip()
            if lin == '':
                return lin
        return lin