[Chicago] is there really no built-in file/iter split() thing?

Michael Tobis mtobis at gmail.com
Sat Dec 1 01:25:27 CET 2007


Ooh, sloppy, shouldn't have called it file... fie...

mt

On Nov 30, 2007 4:59 PM, Michael Tobis <mtobis at gmail.com> wrote:
> def chunker(file,splitter=";"):
>    r = c = ""
>    while (c or not r) and (not c == splitter)
>       c = file.read(1)
>       r.append(c)
>    return r
>
> I suspect I'm missing something to make this prettier, but
> file.read(1) seems to be the way to go through a file bytewise.
>
> mt
>


More information about the Chicago mailing list