#NEWLINE# def gen_avro( filename ) : #NEWLINE# #INDENT# schema = avro . schema . parse ( SCHEMA ) #NEWLINE# fo = open ( filename , 'wb' ) #NEWLINE# writer = DataFileWriter ( fo , DatumWriter ( ) , schema ) #NEWLINE# for record in looney_records ( ) : #NEWLINE# #INDENT# writer . append ( record ) #NEWLINE# #UNINDENT# writer . close ( ) #NEWLINE# fo . close ( )