“FILO DE ZIP Python” Respostas de código

como descompactar arquivos usando o módulo ZipFile Python

import zipfile
with zipfile.ZipFile("file.zip","r") as zip_ref:
    zip_ref.extractall("targetdir")
Muddy Millipede

FILO DE ZIP Python

import zipfile
with zipfile.ZipFile(path_to_zip_file, 'r') as zip_ref:
    zip_ref.extractall(directory_to_extract_to)
Happy Herring

UNZIP_DATA Python

import zipfile

path = '/path_to_your/zip_file'
zip_ref = zipfile.ZipFile(path,'r')
zip_ref.extractall(directory_to_extract) # or leave blank to extract to current directory
The Legendary Ctrl+C

Como salvar arquivos descompactados no Python


import zipfile
def un_zipFiles(path):
    files=os.listdir(path)
    for file in files:
        if file.endswith('.zip'):
            filePath=path+'/'+file
            zip_file = zipfile.ZipFile(filePath)
            for names in zip_file.namelist():
                zip_file.extract(names,path)
            zip_file.close() 
Enthusiastic Eland

Python descompacte um zíper

# app.py

from zipfile import ZipFile

with ZipFile('Mail3.zip', 'r') as zipObj:
   # Extract all the contents of zip file in different directory
   zipObj.extractall('temp')
   print('File is unzipped in temp folder')
Delightful Dugong

Como extrair arquivo zip usando python

ZipFile.extractall(path=None, members=None, pwd=None)
Xerothermic Xenomorph

Respostas semelhantes a “FILO DE ZIP Python”

Perguntas semelhantes a “FILO DE ZIP Python”

Procure respostas de código populares por idioma

Procurar outros idiomas de código