<div dir="ltr"><div><div><div>This is very old DNA. The persistent user request was a way to bundle up a Python program as a single executable file that could be sent to a friend or colleague and run without first having to install Python. If you Google for python freeze you'll still see old references to it. <br>

<br>IIRC I did the original version -- it would scan your main program and try to follow all your imports to get a list of modules (yours and stdlib) that would be needed, and it would then byte-compile all of these and produce a huge C file. You would then compile and link that C file with the rest of the Python executable. All extensions would have to be statically linked.<br>

<br></div>I think this was also used as the basis of a similar tool that worked for Windows.<br><br></div>Nowadays installers are much more accessible and easier to use, and Python isn't so new and unknown any more, so there's not much demand left.<br>

<br></div>--Guido<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Nov 16, 2013 at 9:48 AM, Eric Snow <span dir="ltr"><<a href="mailto:ericsnowcurrently@gmail.com" target="_blank">ericsnowcurrently@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">While looking at something unrelated, I happened to peek at<br>
Python/frozenmain.c and found Py_FrozenMain().  I kind of get the idea<br>
of it, but am curious what motivated the addition and who might be<br>
using it.  The function is not documented and doesn't have much<br>
explanation.  I'm guessing that not many are familiar with it (e.g.<br>
<a href="http://bugs.python.org/issue15893" target="_blank">http://bugs.python.org/issue15893</a>).<br>
<br>
FWIW the function was added quite a while ago (and hasn't been touched<br>
a whole lot since):<br>
<br>
changeset:   1270:14369a5e61679364deeae9a9a0deedbd593a72e0<br>
branch:      legacy-trunk<br>
user:        Guido van Rossum <<a href="mailto:guido@python.org">guido@python.org</a>><br>
date:        Thu Apr 01 20:59:32 1993 +0000<br>
summary:     Support for frozen scripts; added -i option.<br>
<br>
-eric<br>
_______________________________________________<br>
Python-Dev mailing list<br>
<a href="mailto:Python-Dev@python.org">Python-Dev@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-dev" target="_blank">https://mail.python.org/mailman/listinfo/python-dev</a><br>
Unsubscribe: <a href="https://mail.python.org/mailman/options/python-dev/guido%40python.org" target="_blank">https://mail.python.org/mailman/options/python-dev/guido%40python.org</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>--Guido van Rossum (<a href="http://python.org/~guido">python.org/~guido</a>)
</div>