Python鸡蛋的缺点? [英] Disadvantage of Python eggs?
问题描述
与传统的packages / modules / libs相比,通过 easy-install
使用鸡蛋有什么缺点吗?
Are there any disadvantages about using eggs through easy-install
compared to the "traditional" packages/modules/libs?
推荐答案
一个(潜在的)缺点是蛋默认是压缩的,除非 zip_safe = False
设置在 setup.py
中的 setup()
如果一个鸡蛋被压缩,你不能得到它的文件(没有解压缩,显然)。如果模块本身使用非源文件(如模板),它可能会指定 zip_safe = False
,但另一个结果是你不能有效地使用 pdb
,Python调试器。也就是说,您可以,但是您将无法看到源或正确导航。
One (potential) disadvantage is that eggs are zipped by default unless zip_safe=False
is set in their setup()
function in setup.py
. If an egg is zipped, you can't get at the files in it (without unzipping it, obviously). If the module itself uses non-source files (such as templates) it will probably specify zip_safe=False
, but another consequence is that you cannot effectively step into zipped modules using pdb
, the Python debugger. That is, you can, but you won't be able to see the source or navigate properly.
这篇关于Python鸡蛋的缺点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!