“Python читать Zipfile” Ответ

Python читать Zipfile

# Extract all contents from zip file
import zipfile
with zipfile.ZipFile('filename', 'r') as myzip: #'r' reads file, 'w' writes file
    myzip.extractall()
# The zipfile will be extracted and content will be available in your working
# directory.
Kwams

Извлечь zip -файл в Python Zipfile

from zipfile import ZipFile
import zipfile

with ZipFile('test.zip') as myzip:
    with myzip.open('Roughwork/textfile.text') as myfile:
        print(myfile.readlines())Copy Code
Pythonist

Ответы похожие на “Python читать Zipfile”

Вопросы похожие на “Python читать Zipfile”

Больше похожих ответов на “Python читать Zipfile” по Python

Смотреть популярные ответы по языку

Смотреть другие языки программирования