📄 read_from_zip.py
字号:
#------------------------------------------------------------------------------
# Name: read_from_zip.py
# Author: Kevin Harris (kevin@codesampler.com)
# Last Modified: 02/13/04
# Description: This Python script demonstrates how to use zipfile to read
# from a zipped archive.
#------------------------------------------------------------------------------
import zipfile
myZipFile = zipfile.ZipFile( "test.zip", "r" )
for fileName in myZipFile.namelist():
data = myZipFile.read(fileName)
print fileName, len(data), repr(data[:50])
raw_input( '\n\nPress Enter to exit...' )
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -