#NEWLINE# def attributes_iterator( attributes ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# buf = create_string_buffer ( ATTR_BUFFER ) #NEWLINE# while ( drmaa_get_next_attr_value ( buf , buf , sizeof ( buf ) ) != NO_MORE_ELEMENTS ) : #NEWLINE# #INDENT# ( yield buf . value . decode ( ) ) #NEWLINE# #UNINDENT# #UNINDENT# except : #NEWLINE# #INDENT# drmaa_release_attr_values ( attributes ) #NEWLINE# raise #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# drmaa_release_attr_values ( attributes )