开发者

Getting modules from a zip file?

开发者 https://www.devze.com 2023-01-14 01:32 出处:网络
There is a module I\'d love to download, but it is only available in a zip file, how do I get such a file to work properly in python, so That I can import what 开发者_运维问答I want?

There is a module I'd love to download, but it is only available in a zip file, how do I get such a file to work properly in python, so That I can import what 开发者_运维问答I want?

This is in Windows 7 BTW.


Just insert the whole path to the zipfile, c:/what/ever/itis.zip, in your sys.path, and import themodule (assuming it's at the top "level" of the zipfile's simulated directory-tree structure).

0

精彩评论

暂无评论...
验证码 换一张
取 消