while c = f.read(1)

Greg McIntyre greg at puyo.cjb.net
Wed Aug 24 21:18:10 EDT 2005


John Machin wrote:
> Sigh indeed. If you need to read it a character at a time to parse it,
> the design is f***ed.

There is always the potential to do 2k buffered reads and once in
memory pick the contents apart character-wise.

I assume something similar would happen for tokenising XML and HTML
which would presumably often 'read until "<"'.




More information about the Python-list mailing list