Hi All--
def testCode(data):
buf=data[:]
# and I hope you're going to do something with buf,
# because otherwise this function's a bit of a waste;-)
"[EMAIL PROTECTED]" wrote:
>
> Hello,
>
> How does Python deal with C type memory buffers. Does Python return
> everything as an object irrespective of the data type?
>
> Here's what i am trying to achieve?
>
> testCode(unsigned char buf, unsigned long len)
> {
> unsigned long data=0x0;
> while (len--)
> {
> *buf++ = (unsigned char)data++
> }
> ....
> }
>
> What's the best way to deal with this in python?
>
Metta,
Ivan
----------------------------------------------
Ivan Van Laningham
God N Locomotive Works
http://www.andi-holmes.com/
http://www.foretec.com/python/workshops/1998-11/proceedings.html
Army Signal Corps: Cu Chi, Class of '70
Author: Teach Yourself Python in 24 Hours
--
http://mail.python.org/mailman/listinfo/python-list