[IronPython] What is .AppendChunk expecting?

Vernon Cole vernondcole at gmail.com
Thu Aug 28 06:51:44 CEST 2008


On Wed, Aug 27, 2008 at 9:50 PM, Curt Hagenlocher <curt at hagenlocher.org>wrote:

> Two more ideas:
>
> 1) Try passing a list of numbers.  You can trivially get this from the
> buffer by saying
> a = map(lambda c: ord(c), buf)
> 2) Try passing a BCL array of bytes.  This is almost as easy:
> import System
> a = System.Array[System.Byte](map(lambda c: ord(c), b))
>
> 1) gave
 TypeError: Specified cast is not valid.
  again.

2) implemented as:
     from System import Array,Byte
     a = Array[Byte](map(lambda c: ord(c),elem))
     p.AppendChunk(a)
gives:
 SystemError: Unexpected VarEnum 8209.

which is new, at least.
--
VC
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20080827/eba04b8d/attachment.html>


More information about the Ironpython-users mailing list