code: def _read_line(self, f):
          
          l = f.readline().strip()
          while l == "" or l[0] == "#": # comment or an empty line
              l = f.readline().strip()
          return l
docs: Reads one non empty line (if it's a comment, it skips it).