But when I open the zip file from windows, it doesn't ask for the password. I will be using the same password to read zip files from python later on.
What am I doing wrong? The documentation for zipfile indicates that ZipFile. At the very top of the documentation: "It supports decryption of encrypted files in ZIP archives, but it currently cannot create an encrypted file.
Edit: To create a password protected ZIP file, try a package like pyminizip. The builtin zipfile module does not support writing password-encrypted files only reading. Either you could use pyminizip :. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Create password protected zip file Python [duplicate] Ask Question.
Asked 4 years, 1 month ago. Active 4 years, 1 month ago. Viewed 23k times. Improve this question. Tahreem Iqbal Tahreem Iqbal 6 6 gold badges 15 15 silver badges 40 40 bronze badges. Can you actually access file files? Or just visualize it? That's a common behavior in zip password protections that you actually can see the files even though it's password protected.
I even opened it. What's the point of setting the password if its just gonna open it anyway? Galen I don't think so. I've checked every related question on this site and still having problems. Add a comment. Active Oldest Votes. Improve this answer. Related Articles. Table of Contents. Improve Article. Save Article. Like Article. Last Updated : 24 Jan, Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
Recommended Articles. Article Contributed By :. Easy Normal Medium Hard Expert. Writing code in comment? Please use ide. Load Comments. What's New.
0コメント