title: Bio.SwissProt.parse on swiss formatted in memory data in chunks
body: <p>I'd like to read in swiss data and get records in chunks instead of reading in the entire file.</p>
  <p>So far, I've split the file into chunks as seen below</p>
  <pre><code>from io import StringIO
  
  sprot_io = StringIO()
  
  footer = b'CC   ---------------------------------------------------------------------------\n'
  with gzip.open(response['Body'], &quot;r&quot;) as f:
      for row in f:
          if row == footer:
              sprot_io.write(row.decode('utf-8'))
              &lt;now parse the record&gt;
  
              sprot_io = list()
  
          else:
              sprot_io.write(row.decode('utf-8'))
  </code></pre>
  <p>However, when I try to parse these chunks using Bio.SwissProt.parse, I get an unexpected end of file error</p>
  <pre><code>def parse_record(file):
      seq = next(SeqIO.parse(file, format='swiss'))
      return seq
  </code></pre>
  <p>I use next because the function is actually returning a generator, but I should only be getting one record anyway.</p>
  <p>I'm assuming there is something wrong with the format I'm giving to it, but I haven't been able to figure out what could be going wrong from looking at the base code</p>
  <p><a href="https://github.com/biopython/biopython/blob/master/Bio/SwissProt/KeyWList.py" rel="nofollow noreferrer">https://github.com/biopython/biopython/blob/master/Bio/SwissProt/KeyWList.py</a></p>
  <p>This is the file I'm trying to parse, but warning... it is roughly 3 gigs
  <a href="ftp://ftp.uniprot.org/pub/databases/uniprot/current_release/knowledgebase/complete/uniprot_*.dat.gz" rel="nofollow noreferrer">ftp://ftp.uniprot.org/pub/databases/uniprot/current_release/knowledgebase/complete/uniprot_*.dat.gz</a></p>
  <p>Any help would be greatly appreciated.</p>