[BioPython] RecordFile

Cayte katel@worldpath.net
Sun, 24 Jun 2001 22:39:32 -0700


I just contributed RecordFile.py.  If you pass a start tag and an end tag to
the class, RecordFile skips over boilerplate and returns record data.It is
intended to eliminate cutting and pasting.  T

This is a usage example from the driver file.

file_record = Bio.RecordFile.RecordFile( handle, 'KADBID', 'RECEND|' )
for j in range( 0, 3 ):
    alltext = ''
    while( 1 ):
        text = file_record.read( size = 8 )
        if( text == '' ) : break
        alltext = alltext + text
        text = file_record.read( size = 13 )
        if( text == '' ) : break
        alltext = alltext + text
        text = file_record.read( )
        if( text == '' ) : break
        alltext = alltext + text
    print 'text from file_record is \n%s&&&&&&&&' % alltext

file_record.close()


                          Cayte