简体   繁体   English

如何用python创建一个受密码保护的zipfile?

[英]How to create a password protected zipfile with python?

Since python2.6, it's now easier to extract data from a password protected zip. 从python2.6开始,现在可以更容易地从受密码保护的zip中提取数据。 But how to create a password protected zipfile in pure python ? 但是如何在纯python中创建一个受密码保护的zipfile?

I've looked for this in the past and been unsuccessful. 我过去一直在寻找这个并且没有成功。 (I'd love to see a solution get posted!) (我很乐意看到解决方案发布!)

One option is a commercial package from chilkatsoft that will do this, but at $150. 其中一个选择是来自chilkatsoft的商业软件包可以做到这一点,但价格为150美元。 Makes sense if you are doing a commercial app, but tough to swallow otherwise. 如果你正在做一个商业应用程序,但有点难以吞咽,这是有道理的。

I wound up calling out to the system for my solution, a while ago. 不久前,我结束了呼吁系统寻求解决方案。 Unfortunately, this locks it to a platform. 不幸的是,这将它锁定到一个平台。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM