“Python Leer Zipfile” Código de respuesta

Python Leer 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

Extraer el archivo zip en 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

Respuestas similares a “Python Leer Zipfile”

Preguntas similares a “Python Leer Zipfile”

Más respuestas relacionadas con “Python Leer Zipfile” en Python

Explore las respuestas de código populares por idioma

Explorar otros lenguajes de código