Sometimes to save space , You can compress the package into zip file , It's easy to manage , Easy to upload to the Internet , It's also easy to copy . But is there any way to use zip Package of files , You don't need to decompress it ？ There is .
First create a directory as follows ：
And then put demo Directories use compression software , Or use Python Inside zip modular , You can generate compressed files mylib.zip.
In the catalog demo Created in __init__.py file , Then enter the following in the file ：
# Learning algorithm notes - Cai Junsheng （qq:9073204) #https://mysoft.blog.csdn.net/ #2020-10-30 def show(): print(' Test from zip Import package in file ')
Then create a test