6

The Python Doc states:

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.

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

I don't get it. What is the freeze utility? How can it be used? Why would it be used?

Dave Halter
  • 15,556
  • 13
  • 76
  • 103

2 Answers2

3

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.

jdi
  • 90,542
  • 19
  • 167
  • 203
2

It's similar to tools like py2exe: You can create a single executable that runs a python program without requiring the user to install separate packages, the python interpreter, etc. It is only for Unix/Linux(/possibly OSX) systems though; on Windows you use py2exe for it.

Have a look at http://wiki.python.org/moin/Freeze for more information.

ThiefMaster
  • 310,957
  • 84
  • 592
  • 636
  • 2
    Oh you bastard. That was my answer from the other question and the OP told me to post it over here :-P http://stackoverflow.com/questions/9916432/what-is-a-frozen-python-module#comment12655698_9916432 – jdi Mar 28 '12 at 22:44
  • 1
    Username checks out – Machinexa Sep 25 '21 at 04:32