Category "python-zipfile"

zipfile extractall pauses script (Raspberry python3)

I have a dictionary with 10 words (one IS the correct password) script on python3 (on Raspberry) iterates over dictionary when it gets to the right password , p

Getting error 'NotImplementedError("That compression method is not supported")' when extracting zipfile in python3.9

I have read through the Python documentation about zip files and watched a couple of videos, but everything didn't work. I'm using Kali Linux, so that the passw

Python zipfile try except not passing over "zlib.error: Error -3 while decompressing data: invalid distance too far back"

I am working on a python script to unzip a folder of nested zip files. In general, it seems to be working, but when it comes to one of the files I always receiv

Different File Paths in Python ZipFile Depending on .write() vs .writestr()

I just wanted to ask quickly if the behavior I'm seeing in Python's zipfile module is expected... I wanted to put together a zip archive. For reasons I don't th

Different File Paths in Python ZipFile Depending on .write() vs .writestr()

I just wanted to ask quickly if the behavior I'm seeing in Python's zipfile module is expected... I wanted to put together a zip archive. For reasons I don't th

Create a zip of folders using zipfile

I have a folder called my_folder at the following Path /Users/my_user_name/Desktop/my_folder. The folder my_folder contains more folders like 323456, 987654 etc

zipfile: Adding files to encrypted zip [duplicate]

I have an encrypted ZIP file and for some reason, any password I feed it doesn't seem to matter as it can add files to the archive regardless.

python replace string on files inside zipfile

I'm trying to replace a specific string inside files that are inside a zip file (and keep the zip folder structure and other files intact) using the following p

Make ZipFile write a backslash to a filename

I want my zipped filenames to contain a backlash, but unfortunately I can't get it to work. Currently I use: from zipfile import ZipFile zipObj = ZipFile('samp

Python zipfile extract files from directory inside a zip file

I need to extract some files inside a directory in a zip file. The main problem is that I want to extract only the contents from this directory, not the directo

Problem with the python zipfile library if you share a file between linux and windows [duplicate]

The zipfile module is very interesting to manage .zip files with python. However if the .zip file has been created on a linux system or macos

How do I convert a ZipFile object to an object supporting the buffer API?

I have a ZipFile object that I need to convert to an object that will work with the buffer api. Context is that I am trying to use an API that says it takes a f

Read files with ZipFile using multiprocessing

I'm trying to read raw data from a zipfile. The structure of that file is: zipfile data Spectral0.data Spectral1.data Spectral[...].data Spectral300.data Heade

Python's zipfile library can't extract password protected file

For some reason, Python's zipfile library cannot extract the files in this password-protected zipfile archive. Here is the code I used: import zipfile zip_file

Zipfile lib weird behaviour with seconds in modified time

Working with zipfile module I found something weird about how it works. I'm zipping one file, which last modified attr time is: 13:40:31 (HH:MM:SS) When I zip a

Flask FileStorage file becomes empty after creating ZipFile object

I'm trying to save a .zip file received from an endpoint, but first check the contents of the .zip. If I do: import zipfile from Flask import request file = re

How to read all zipfile in python

I have a zipfile for example, i changed some files in zip and i need to encrypt it and after that save def encrypt(self, zipfile: ZipFile): import base64

Not yielding files inside nested folders using python zipfile

(Python 3.8, zipfile module, Windows 10 Anaconda) I was using the zipfile module of python to create Zip Files of my folders. My Folder was D:/Personals. An os.

Not yielding files inside nested folders using python zipfile

(Python 3.8, zipfile module, Windows 10 Anaconda) I was using the zipfile module of python to create Zip Files of my folders. My Folder was D:/Personals. An os.

Unzipping an archive with zipfile turns an exe into text file (MacOS)

I'm using zipfile (Python 3.6) on a Mac to unzip a zip archive containing files, folders, and an executable. The executable was made with PyInstaller and zipped