- mongodb - 在 MongoDB mapreduce 中,如何展平值对象?
- javascript - 对象传播与 Object.assign
- html - 输入类型 ="submit"Vs 按钮标签它们可以互换吗?
- sql - 使用 MongoDB 而不是 MS SQL Server 的优缺点
我是 Python 新手,我只是想了解它的包是如何工作的。大概 eggs
是某种包装机制,但什么是它们所扮演角色的快速概述,可能是关于它们为什么有用以及如何创建它们的一些信息?
最佳答案
与Java中的.jar
文件的概念相同,它是一个.zip
文件,其中一些元数据文件重命名为.egg
,用于分发代码作为包。
Specifically: The Internal Structure of Python Eggs
A "Python egg" is a logical structure embodying the release of a specific version of a Python project, comprising its code, resources, and metadata. There are multiple formats that can be used to physically encode a Python egg, and others can be developed. However, a key principle of Python eggs is that they should be discoverable and importable. That is, it should be possible for a Python application to easily and efficiently find out what eggs are present on a system, and to ensure that the desired eggs' contents are importable.
The
.egg
format is well-suited to distribution and the easy uninstallation or upgrades of code, since the project is essentially self-contained within a single directory or file, unmingled with any other projects' code or resources. It also makes it possible to have multiple versions of a project simultaneously installed, such that individual programs can select the versions they wish to use.
关于python - 什么是 Python 蛋?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2051192/
我正在尝试使用“sudo easy_install appscript”在 mac 上安装 py-appscript。命令运行,我收到一条消息说“Installed/Library/Python/..
我是 Python 新手,我只是想了解它的包是如何工作的。大概 eggs 是某种包装机制,但什么是它们所扮演角色的快速概述,可能是关于它们为什么有用以及如何创建它们的一些信息? 最佳答案 Note:
我有一个模型: class Foo(models.Model): pass 我想给它添加一个类型属性。有固定数量的类型。现有的应该都具有默认类型。所以我添加了类型: class Type(mo
我是一名优秀的程序员,十分优秀!