Re: Segmenting a pickle stream without unpickling

2006-05-19 Thread Tim Peters
[Boris Borcic] > Assuming that the items of my_stream share no content (they are > dumps of db cursor fetches), is there a simple way to do the > equivalent of > > def pickles(my_stream) : > from cPickle import load,dumps > while 1 : > yield dumps(load(my_stream)) > > without the

Re: Segmenting a pickle stream without unpickling

2006-05-19 Thread Paul Rubin
Boris Borcic <[EMAIL PROTECTED]> writes: > def pickles(my_stream) : > from cPickle import load,dumps > while 1 : > yield dumps(load(my_stream)) > > without the overhead associated with unpickling objects > just to pickle them again ? I think you'd have to write something specia