Index: Lib/urllib/response.py =================================================================== --- Lib/urllib/response.py (revision 67893) +++ Lib/urllib/response.py (working copy) @@ -31,6 +31,16 @@ return '<%s at %r whose fp = %r>' % (self.__class__.__name__, id(self), self.fp) + def __iter__(self): + return self.fp + + def __next__(self): + line = self.readline() + if line: + return line + else: + raise StopIteration + def close(self): self.read = None self.readline = None