efficient in-place byte modifications

Alex Martelli aleaxit at yahoo.com
Wed Aug 15 13:28:23 EDT 2001


"Cimarron Taylor" <cimarron+google at taylors.org> wrote in message
news:29e28c51.0108150911.28f315ff at posting.google.com...
> Hi, I'm looking into using python to prototype a program
> which will read, process and retransmit network packets
> using a simple pair threads and a pool of packet buffers.
>
> At first glance, it seems Python has all the networking
> and threading operations I need.  The thing is, I need to
> do a lot of separate in-place modifications of the contents
> of the packets, so using (immutable) strings for packets
> probably won't work.
>
> I think my remaining options are to:
>
> 1. use the array module for the buffers

This one should be just fine.  Why not?  An array of
bytes appear to be just what you desire as a "packet
buffer", from your summary description.


Alex






More information about the Python-list mailing list