code: def readline(self, f):
          
          while True:
              line = f.readline()
              if len(line) == 0:
                  raise EOFError
              line = line[:line.find('#')]
              line = line.strip()
              if len(line) > 0:
                  return line
docs: A helper method that only reads uncommented lines