Counting bytes

Hugo Martires hmartires at
Mon Feb 25 15:27:51 CET 2002

See my point:
I need to send a list in a socket

server side
list = [0.5 0.5 0.5 0.5]

client side

the problem is the buffer size (1024 bytes)
if i need to send a "big" list (with more than 1024 bytes), i have to count
the number of bytes to send in parts. So i must know how many bytes my list

Did your understand my problem ?
All the help you can provide will be apreciated.


"Martin von Loewis" <loewis at> wrote in message
news:j4664lllc6.fsf at
> "Hugo Martires" <hmartires at> writes:
> > And how can i count in a list ?
> > It is possible ?
> Read the source code. Alternatively, read the newsgroup archives,
> searching for "size" and "object", e.g.
> This article also discusses the size of lists.
> Regards,
> Martin

More information about the Python-list mailing list