[Tutor] Zip - password protect

James Reynolds eire1130 at gmail.com
Tue Aug 23 20:23:04 CEST 2011


I tried that already.

that's only to set the default password to read the zip, not to set a
pasword (wording is misleading I think)

On Tue, Aug 23, 2011 at 1:42 PM, Emile van Sebille <emile at fenx.com> wrote:

> On 8/23/2011 10:19 AM James Reynolds said...
>
>  Does anyone know if a way to password protect a zip file? I have no
>> issues creating the zip file, but I would like to password protect as
>> well. I'm aware of a commercial solution, but I would like something
>> open source.
>>
>>
>
> The standard zipfile library includes a setpassword option.
>
> help(zipfile.PyZipFile.**setpassword)
>
> Help on method setpassword in module zipfile:
>
> setpassword(self, pwd) unbound zipfile.PyZipFile method
>    Set default password for encrypted files.
>
>
> Emile
>
>
>
>
> ______________________________**_________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/**mailman/listinfo/tutor<http://mail.python.org/mailman/listinfo/tutor>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20110823/79016d88/attachment.html>


More information about the Tutor mailing list