python:获取缓冲区的大小 [英] python: get size of buffer

查看:45
本文介绍了python:获取缓冲区的大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Python 脚本从本地和远程 (urllib2) 文件中读取数据.

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

返回数据类型是什么?

如何获得这些数据的大小?(真实"大小,而不是 Python 中表示的大小,以防万一).

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

推荐答案

返回类型是字节串.字符串的长度是数据的字节大小.

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

这篇关于python:获取缓冲区的大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆