I think that you want to use return PyString_FromStringAndSize(buf, 8); Jeff -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 196 bytes Desc: not available URL: <http://mail.python.org/pipermail/python-list/attachments/20051024/0ac0115c/attachment.sig>