腾讯云
开发者社区
文档
建议反馈
控制台
首页
学习
活动
专区
工具
TVP
最新优惠活动
文章/答案/技术大牛
搜索
搜索
关闭
发布
登录/注册
精选内容/技术社群/优惠产品,
尽在小程序
立即前往
文章
问答
(606)
视频
沙龙
1
回答
如何在Python3中使用构造函数模拟对象?
python
、
unit-testing
、
testing
、
python-3.x
、
mocking
代码如下: return gzipper.read() from mockito import * <
浏览 0
提问于2011-08-15
得票数 1
1
回答
不阻塞Python的ftplib管道
python
、
ftp
、
stream
、
pipe
、
ftplib
goldenPath/{args.reference}/database/refFlat.txt.gz', file.write) table = gzip.
GzipFile
浏览 5
提问于2017-02-14
得票数 2
1
回答
如何在S3中读取巨大的S3文件,因为我在读取内存时出错
python
、
amazon-web-services
、
amazon-s3
、
gzip
files: obj = s3.Object(bucket_name=bucket ,key=i) content =
gzipfile
.read()我在这一行得到了MemoryError,content =
浏览 2
提问于2022-02-09
得票数 1
1
回答
将io.BytesIO对象传递给gzip.
GzipFile
并写入
GzipFile
python-3.x
、
gzip
、
bytesio
我基本上想在gzip.
GzipFile
文档中做些什么 >>> fileobj = open("test", "wb")True&
浏览 6
提问于2015-09-26
得票数 3
回答已采纳
1
回答
body /Python- "IOError:[Errno 9]对只写的
GzipFile
对象的读()“当试图解压缩请求体时
python
、
gzip
、
bottle
下面是用于读取和解压缩请求主体的代码:def receive(): f = request.body g_f = gzip.
GzipFile
2015-09-07 16:27:27,967][ERROR ] Failed to decompress gzipped data: [Errno 9] read() on write-only
GzipFile
浏览 0
提问于2015-09-07
得票数 1
回答已采纳
1
回答
如何使用gzip解压缩从服务器检索的字符串
python
、
python-2.7
、
sockets
、
compression
、
gzip
localhost', 10000))data = s.recv(4096) fil =gzip.
GzipFile
浏览 0
提问于2019-04-08
得票数 1
回答已采纳
1
回答
使用Boto3从AWS S3读取gzip文件的内容
python
、
amazon-s3
、
aws-sdk
、
boto3
test.gz' n = obj.get()['Body'].read() gzip = BytesIO(n) content =
gzipfile
.read() return 'dddd' "
浏览 1
提问于2018-11-30
得票数 1
4
回答
如何读取包含在gz文件中的文件名
python
、
gzip
、
compression
我试着读了一个gz文件: with gzip.
GzipFile
(fileobj=
gzipfile
) as datafile:它的工作,但我需要的文件名和大小的每个文件包括在我的gz文件。
浏览 0
提问于2013-03-25
得票数 7
1
回答
Python单元测试如何使用Mox模拟gzip with语句
python
、
unit-testing
、
gzip
、
mox
Python中,如何使用mox单元测试库模拟在with语句中创建的对象class MyCode: with gzip.
GzipFile
test_generate_gzip_file(self): mock_gzip_file = self.mox.CreateMock(gzip.
GzipFile
) mox.StubOutWithMock(gzip, '
GzipFile</
浏览 13
提问于2012-01-18
得票数 1
回答已采纳
2
回答
如何从npy.gz文件恢复numpy数组
python
、
numpy
我用下面的代码保存了许多numpy对象:np.save(file=f, arr=np.rint(trimmed我试过了:text =
gzipfile
.read() te
浏览 19
提问于2017-03-17
得票数 9
回答已采纳
1
回答
将输出转换为JSON文件
python
、
json
、
amazon-s3
20200604T143500Z.log.gz' n = obj.get()['Body'].read()
gzipfile
= gzip.
GzipFile
(fileobj=
gzipfile
) print
浏览 13
提问于2020-07-07
得票数 0
2
回答
在没有mapreduce的情况下将普通java代码转换为hadoop代码?
java
、
hadoop
、
compression
、
hdfs
String file = "/media/0052ADF152ADEC1A/all splits/File" + i + ".txt"; compressGzipFile(file,
gzipFile
)
浏览 1
提问于2014-04-24
得票数 0
3
回答
java:将字符串保存为gzip文件
java
、
string
、
gzip
、
compression
我是java初学者,我需要像这样的东西String2
GzipFile
("Lorem ipsum
浏览 0
提问于2011-05-14
得票数 14
回答已采纳
4
回答
如何处理包含额外数据的Gzip文件?
python
、
gzip
调用
GzipFile
对象的close()方法不会关闭fileobj,,因为您可能希望在压缩数据之后追加更多的材料。with open(filename, "rb") as
gzipfile
:with open(filename, &
浏览 2
提问于2011-02-08
得票数 15
回答已采纳
1
回答
Gzip文件阅读器Scala
performance
、
scala
、
optimization
、
file-io
、
gzip
我对scala还不熟悉,而且我还在飞来飞去地搞清楚事情。我有一个程序需要读取不同大小的Gzip文件-20 is,2MB和150 2MB(是的,压缩文件是150 2MB)。我认为不应该有不同的方法来读取不同的文件,而应该是一种标准的方法。我看到的大多数方法都使用64 to的缓冲区大小逐行读取文件?什么是最好的方式(读为,*最快和干净的记忆*方式做它)的方式来做这个?更新1:但是,我注意到,由于我的每个文件都有大约10K行,在将它们写入文件时,需要很长时间才能将String Iterator转换为字符串,然后再写入文件。
浏览 2
提问于2013-11-05
得票数 0
回答已采纳
1
回答
python熊猫从s3读取json文件
pandas
、
aws-lambda
、
gzip
、
python-3.8
as pd response = s3.Object(bucket, 'test.gzip') with gzip.
GzipFile
(fileobj=response.get()["Body"], mode='rb') as
gzipfile
: print(f'
gzipfile
: {
gzipfile
}')#
gzipf
浏览 3
提问于2022-05-09
得票数 0
4
回答
Python :有没有一种从字符串中解压缩的方法?
python
、
gzip
in main File "/usr/lib/python2.5/gzip.py", line 49, in open return
GzipFile
浏览 9
提问于2009-10-09
得票数 36
回答已采纳
1
回答
用Python2.7解压缩zip字符串
python
、
python-2.7
、
zlib
我正在尝试解压缩Python2.7中的byte64编码字符串。echo -n "MY_BASE64_ENCODED_STRING" | base64 -d | zcatb64_data = 'MY_BASE64_ENCODED_STRING'我有个例外: 我是否应该将额外的参数传递给zli
浏览 5
提问于2017-01-02
得票数 5
1
回答
如何在gae云上打开gzip文件?
python
、
google-app-engine
、
gzip
、
google-cloud-storage
、
google-compute-engine
我正在使用python2.7和。我想处理一个上传到gcs数据存储的gzip文件。在Python上,这将是:with gzip.open('myfile.gz', 'r') as f:由于在GCS上不允许这样做,所以我在上找到的唯一选项是:cloudstorage.open('myfile.gz', 'r'):它不打开gzip文件。关于我怎么做到的有什么建议吗?
浏览 2
提问于2016-02-29
得票数 0
回答已采纳
3
回答
如何从urllib.urlopen()返回的“类文件对象”创建
GzipFile
实例?
python
、
gzip
、
urllib
import urllib, gzip gzip.
GzipFile
但是,当我在使用它创建的
GzipFile
对象上运行read()时,我得到以下错误:url
浏览 3
提问于2010-11-17
得票数 15
回答已采纳
点击加载更多
扫码
添加站长 进交流群
领取专属
10元无门槛券
手把手带您无忧上云
相关
资讯
利用 Python 编写简单网络爬虫实例 3
利用 Python 编写简单网络爬虫实例 1
Python源代码
Python 爬虫:8 个常用的爬虫技巧总结!
Python爬虫:一些常用的爬虫技巧总结
热门
标签
更多标签
云服务器
即时通信 IM
ICP备案
对象存储
实时音视频
活动推荐
运营活动
广告
关闭
领券