#NEWLINE# def get_bool( _bytearray , byte_index , bool_index ) : #NEWLINE# #INDENT# '\n    Get the boolean value from location in bytearray\n    ' #NEWLINE# index_value = ( 1 << bool_index ) #NEWLINE# byte_value = _bytearray [ byte_index ] #NEWLINE# current_value = ( byte_value & index_value ) #NEWLINE# return ( current_value == index_value )