EvilZone

Programming and Scripting => Scripting Languages => : fox12345 October 12, 2013, 06:13:04 AM

: How do I set password to compressed zip files in Python?
: fox12345 October 12, 2013, 06:13:04 AM
:

import zipfile
A = zipfile.ZipFile("A.zip", "w")
A.write("12345.txt")
A.close()
: Re: How do I set password to compressed zip files in Python?
: vezzy October 12, 2013, 02:55:11 PM
You can't directly with the standard library.

You can however, open a subprocess or make a system call to a shell utility like zip, 7zip or whatever is applicable.