is there a record separator? RS

greg andruk meowing at banet.net
Thu Oct 14 22:07:28 EDT 1999


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.




More information about the Python-list mailing list