[EMAIL PROTECTED] wrote:

> On Feb 8, 3:40 am, Grant Edwards <[EMAIL PROTECTED]> wrote:
>> On 2007-02-08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>>
>> > struct module pack and unpack will only work for fixed size buffer :
>> > pack('>1024sIL', buffer, count. offset) but the buffer size can vary
>> > from one packet to the next  :-(
>>
>> Oh for Pete's sake...
>>
>> struct.pack('>%dsIL' % len(buffer), buffer, count, offset)
>>
>> --
>> Grant Edwards                   grante             Yow!  I want the
>> presidency
>>                                   at               so bad I can already
>>                                   taste
>>                                visi.com            the hors d'oeuvres.
> 
> that is great but how does one unpack on the other side?

By peeking into the header, determining the number of bytes necessary?

But why do you need this anyway - if you know that you will have python on
both ends, use Pyro or xmlrpc.

Diez
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to