Python: get size of buffer


I'm reading data from local and from remote (urllib2) files in a Python script.

What is the return datatype?

How can I get the size of this data? ("real" size, not the size of representation in Python, in case that differs).

Best Solution

The return type is a bytestring. The length of the string is the size in bytes of the data.