Since Python 2.2 it has been possible to iterate over the lines of a file object (PEP 234). This patch provides line-by-line iterators for TarFile.extractfile. The attachment contains forward diffs for both Lib/tarfile.py and Lib/test/test_tarfile.py.
Logged In: YES user_id=1115903 The patch seems to work as advertised; all regression tests pass when run against 2.5a0 (CVS HEAD, built with MSVC .NET) + this patch on Windows XP. Improving the file-likeness of ExFileObject seems like a good idea to me, so I'm all for seeing this get accepted. :)