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