[Biopython] [Entrez] use the handle twice
c.buhtz at posteo.jp
c.buhtz at posteo.jp
Sat Dec 19 12:41:59 UTC 2015
On 2015-12-19 11:06 Peter Cock <p.j.a.cock at googlemail.com> wrote:
> This is the way network handles work, the server returns
> the data to the client computer (your Python code) once
> only. As soon as you read it (or Biopython's parser does),
> the data is gone.
Then make it possible to cache the informations.
UndoHandle? Find the API-reference but not a docu with examples how to
use this.
> For large data, the best plan is simply to save the data
> to a file on disk, then reopen the file for reading and
> parse it.
I see no way to do this. e.g.
import Bio.Entrez
import zipfile
z = zipfile.ZipFile('test.zip')
h = z.read( z.namelist()[0] )
r = Bio.Entrez.parse(h)
Now r is a generator and I can not ask things like that
r['Count']
And Bio.Entrez.read(h) doesn't work here - don't understand why.
I just want to know how much records really are comin back from the
server.
--
GnuPGP-Key ID 0751A8EC
More information about the Biopython
mailing list