freeze path problem (on nt)

Sjoerd Mullender sjoerd at acm.org
Mon Jul 8 11:36:35 EDT 2002


I remember we had problems with this too.  If I remember correctly,
this had something to do with the registry (of the installed Python)
messing things up for the frozen application.  What we ended up doing
is ignoring the registry completely (see PyWin_FindRegisteredModule in
PC/import_nt.c) in the frozen application.  This meant that we had to
compile Python separately for our frozen app.

I'd argue that a frozen Python application should *never* use the
registry of an installed Python.  You don't have control over it, and
it may well be a different (and incompatible) version.

On Mon, Jul 8 2002 Aaron Watters wrote:

> Hi guys.  I have the following problem.
> 
> I use tools/freeze to build a frozen exe (X.exe) for windows using vc++ 6.
> 
> If I run it on a machine without a python installation it runs fine.
> But if I run it on a machine with python and a package called
> 
>     rlextra.rml2pdf
> 
> then the import
> 
>     from rlextra.rml2pdf import rml2pdf
> 
> imports the python module from the file system in preference to the
> frozen pyc that is compiled into X.exe.  This is a problem, of course
> if the version of rml2pdf on the file system differs from the one in X.exe.
> 
> It must have something to do with sys.path and/or those goofy *.pth files
> right?
> 
> Anyway, how do I prevent X.exe from trying to import stuff from the
> file system first before looking internally... anybody got a clue?
> 
> thx in advance
> 
>    =- Aaron Watters
> 
> ===
> JUVENILE COURT TO TRY SHOOTING SUSPECT
>    -- from "real headlines" (that should work...)
> -- 
> http://mail.python.org/mailman/listinfo/python-list
> 

-- Sjoerd Mullender <sjoerd at acm.org>





More information about the Python-list mailing list