[Pyrex] validity of \0 as null-byte representation in pyrex python def?
Greg Ewing
greg at cosc.canterbury.ac.nz
Tue Apr 29 03:11:21 CEST 2003
cmulcahy at avesi.com:
> the code, fromaddr = recipline.split('\0')[0][1:] et.al
> works fine in vanilla python, but pyrex doesn't seem
> to like "split('\0')" or recognize it as "split on null-bytes".
String literals with null bytes in them don't currently
get converted to Python strings properly. Until I fix
this, you'll have to use PyString_FromStringAndSize to
convert them explicitly (see the FAQ).
Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury, | A citizen of NewZealandCorp, a |
Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. |
greg at cosc.canterbury.ac.nz +--------------------------------------+
More information about the Pyrex
mailing list