is there a record separator? RS

Tom Culliton culliton at clark.net
Thu Oct 14 23:37:28 EDT 1999


In article <87ln9574wv.fsf at banet.net>, greg andruk  <meowing at banet.net> wrote:
>Tom Culliton <culliton at clark.net> wrote:
>
>> Sort answer, No, although it's been a long standing TODO item.  Guido
>> even agreeded to it in principle but the volunteer (who shall remain
>> nameless) got sidetracked and never delivered the patch. 8-(  (Mea
>> culpa, mea culpa, mea maxima culpa...)
>
>Well, it annoyed me enough that I gave it a try, and think it might
>actually be working right.  Daring folks may want to give this a try:
>
> <URL:http://members.xoom.com/meowing/python/fileobj.tar.gz>
>
>These are intended to work with the released 1.5.2 sources.  I put
>together the changes as replacment copies of fileobject.c and
>fileobject.h, so that the diff-challenged can experiment too.  Save
>the original fileobject.*, copy in these ones, fire up make and cross
>your fingers.
>
>Doc changes are included; briefly, file objects get a new separator
>attribute, and the read and readine methods now take an optional
>second argument which if true will trim separators.
>
>I believe this is consistent with what TODO number 4.11 discusses; if
>it turns out to be acceptable I can send it in as a proper patch
>against the CVS tree.

Fabulous!

Thats the first part of the job done.  Another thing that made it a
biggish task was the intent that it be supported for all the standard
file like objects, such as StringIO, cStringIO, etc, I remember there
being about a half dozen.  If you're interested you can used deja-news
to dig up the original discussion with the details.  To put words in
Guido's mouth, my impression was that it would have to be uniformly
available to be acceptable.




More information about the Python-list mailing list