Extention String returning

2005-10-24 Thread Tuvas
I have been writing a program that is designed to return an 8 byte string from C to Python. Occasionally one or more of these bytes will be null, but the size of it will always be known. How can I write an extention module that will return the correct bytes, and not just until the null? I would

Re: Extention String returning

2005-10-24 Thread jepler
I think that you want to use return PyString_FromStringAndSize(buf, 8); Jeff pgp3nNxegNjmk.pgp Description: PGP signature -- http://mail.python.org/mailman/listinfo/python-list

Re: Extention String returning

2005-10-24 Thread Jp Calderone
On 24 Oct 2005 11:28:23 -0700, Tuvas [EMAIL PROTECTED] wrote: I have been writing a program that is designed to return an 8 byte string from C to Python. Occasionally one or more of these bytes will be null, but the size of it will always be known. How can I write an extention module that will

Re: Extention String returning

2005-10-24 Thread Fredrik Lundh
Tuvas wrote: I have been writing a program that is designed to return an 8 byte string from C to Python. Occasionally one or more of these bytes will be null, but the size of it will always be known. How can I write an extention module that will return the correct bytes, and not just until

Re: Extention String returning

2005-10-24 Thread Tuvas
Thanks for the help! -- http://mail.python.org/mailman/listinfo/python-list