1.1 --- a/simplex/readers.py Sat Oct 01 17:46:28 2011 +0200
1.2 +++ b/simplex/readers.py Sat Oct 01 17:59:20 2011 +0200
1.3 @@ -18,9 +18,9 @@
1.4 with this program. If not, see <http://www.gnu.org/licenses/>.
1.5 """
1.6
1.7 -class TextFile:
1.8 +class File:
1.9
1.10 - "A wrapper around text files."
1.11 + "A generic file wrapper."
1.12
1.13 def __init__(self, f, accessor):
1.14 self.f = f
1.15 @@ -29,10 +29,14 @@
1.16 def seek(self, pos):
1.17 self.f.seek(pos)
1.18
1.19 +class TextFile(File):
1.20 +
1.21 + "A wrapper around text files."
1.22 +
1.23 def get_records(self):
1.24 - return FileIterator(self.f.xreadlines(), self.accessor)
1.25 + return Iterator(self.f.xreadlines(), self.accessor)
1.26
1.27 -class FileIterator:
1.28 +class Iterator:
1.29
1.30 "An iterator over records employing record accessors."
1.31