Thomas Lotze wrote: > It's definitely no help that file-like objects are iterable; I do want > to get a character, not a complete line, at a time.
Hi,
if i did understand what you mean, what about using mmap? Iterating over
characters in a file like this:
# -*- coding: iso-8859-1 -*-
import os
import mmap
f = open("file.txt", "r+")
size = os.path.getsize("file.txt")
m = mmap.mmap(f.fileno(), size)
for x in m:
print x
m.close()
f.close()
--
http://mail.python.org/mailman/listinfo/python-list
