[IPython-dev] Buffers

Fernando Perez fperez.net at gmail.com
Mon Jul 26 22:33:03 EDT 2010

Glad you worked it out, but I'm worried about one thing: I don't
believe you can send unicode strings as a buffer over the wire.  The
reason is that the two interpreters at both ends of the connection
could have been compiled with different internal unicode encodings.
Python can be compiled to store unicode internally either as UCS-2 or
UCS-4, you can check sys.maxunicode to find out how your particular
build was made:


If you send a unicode string as a buffer from a ucs2 python to a ucs4
one, you'll get  a mess at the other end, I think.

Minor note:
On Mon, Jul 26, 2010 at 6:43 PM, Min RK <benjaminrk at gmail.com> wrote:
> isinstance(s,(str,unicode))

this is equiv. to: isinstance(s, basestring)



More information about the IPython-dev mailing list