BitVector read-from-file Question

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Sun Mar 16 19:25:18 EDT 2008


En Mon, 10 Mar 2008 14:06:07 -0200, Michael Wieher  
<michael.wieher at gmail.com> escribi�:

> I'm trying to read in data from large binary files using BitVector  
> (thanks
> btw, for whoever mentioned it on the list, its nice)
>
> I'll be reading the data in as requested by the user, in (relatively)  
> small
> chunks as needed.
>
> Problem is I can't read the whole file in at once (its ridiculously  
> large)
> and the object created by  BitVector(filename="path") doesn't include a
> "seek" function (to reset the filepointer)
>
> Any suggestions on how to this without
> closing/reopening/reading(offset)/read(data) ? (thats a lot of overhead)

(I understand that you don't want to create a BitVector from the whole  
file, but from many segments)
You could try to circumvent BitVector oddities reading the file yourself  
and creating BitVector objects from the parts you are interested in.

-- 
Gabriel Genellina




More information about the Python-list mailing list