#NEWLINE# def buffer( self , byte_offset = 0 ) : #NEWLINE# #INDENT# 'Get a copy of the array buffer' #NEWLINE# contents = self . ptr . contents #NEWLINE# ptr = ( addressof ( contents . buffer . contents ) + byte_offset ) #NEWLINE# length = ( ( contents . length * 4 ) - byte_offset ) #NEWLINE# return ( buffer ( ( c_char * length ) . from_address ( ptr ) . raw ) if byte_offset else None )