Dave Halter
Dave Halter

Reputation: 16325

What is a frozen Python module?

The Python help of the module imp is talking about a frozen module. What is it?

http://docs.python.org/library/imp.html#imp.PY_FROZEN

Upvotes: 56

Views: 48930

Answers (3)

jdi
jdi

Reputation: 92559

This link explains what the Python Freeze utility is in detail: http://wiki.python.org/moin/Freeze

In a nutshell, it creates a portable version of a python script that carries its own built in interpreter (basically like a binary executable), so that you can run it on machines without python.

Upvotes: 47

ThiefMaster
ThiefMaster

Reputation: 318468

http://docs.python.org/library/imp.html#imp.PY_FROZEN links to http://docs.python.org/library/imp.html#imp.init_frozen which explains it:

Frozen modules are modules written in Python whose compiled byte-code object is incorporated into a custom-built Python interpreter by Python’s freeze utility. See Tools/freeze/ for now.

Upvotes: 10

Ken White
Ken White

Reputation: 125620

The answer is in the same place:

(Frozen modules are modules written in Python whose compiled byte-code object is incorporated into a custom-built Python interpreter by Python’s freeze utility. See Tools/freeze/ for now.)

Upvotes: 5

Related Questions