[BioPython] String instead of file

Yair Benita Y.Benita@pharm.uu.nl
Tue, 11 Sep 2001 12:56:28 +0200


Fasta files can be easily parsed like this:

parser = Fasta.RecordParser()
iterator = Fasta.Iterator(File.txt, parser)
cur_record = iterator.next()

But, how do I parse strings and not a file with this parser?
I am creating sequences and I want to write the in a Fasta format.
Simply making a handle does not work, the error is:

ValueError: I expected a file handle of file-like object

Thanks,
Yair
-- 
Yair Benita
Pharmaceutical Proteomics
Utrecht University