buffer_info error

2005-05-20 Thread [EMAIL PROTECTED]
Hello, buffer_info is giving the following error: AttributeError: 'str' object has not attribute 'buffer_info' Here's the code snippet... dest = '' src = '0123' data = array('B', '\0' * 256) data1 = ''.join([dest, src] print data1 0123 print

Re: buffer_info error

2005-05-20 Thread Peter Hansen
[EMAIL PROTECTED] wrote: data = array('B', '\0' * 256) data1 = ''.join([dest, src] print data.buffer_info()[0]... works print data1.buffer_info()[0]error This output is a string and hence i believe i get the above error. Any ideas? Yes, you are entirely correct. (Integers don't

Re: buffer_info error

2005-05-20 Thread Jp Calderone
On 20 May 2005 13:18:33 -0700, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: i am filling in a packet with source and destination address and using the buffer_info call to pass on the address to an underlying low level call. The src and dest are strings, but buffer_info expects an array. How do i