Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disadvantage of Python eggs?

Are there any disadvantages about using eggs through easy-install compared to the "traditional" packages/modules/libs?

like image 561
Jorge Guberte Avatar asked Apr 28 '10 22:04

Jorge Guberte


People also ask

Why do people cut python eggs?

A common question I get about cutting eggs is, “why would I want to do this?” The most common answer is that most breeders simply can't wait for the eggs to hatch on their own. It is a time-sensitive decision for ball python snake owners to make.

Why do people cut open ball python eggs?

Cutting eggs (pipping) stops weaker baby ball pythons from drowning inside their eggs. The cutting process should be done after 50 days. Done correctly, it will result in more successful hatches. But if you aren't experienced or make a mistake, you could cut the snake.

How do python eggs work?

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.


2 Answers

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.

like image 152
Jason S Avatar answered Oct 17 '22 00:10

Jason S


Using eggs does cause a long sys.path, which has to be searched and when it's really long that search can take a while. Only when you get a hundred entries or so is this going to be a problem (but installing a hundred eggs via easy_install is certainly possible).

like image 25
Ian Bicking Avatar answered Oct 17 '22 02:10

Ian Bicking