[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] From * import * and Pygame2exe



On 7/17/05, andrew baker <failrate@xxxxxxxxx> wrote:
> I know from experience that this method works just fine when using .py
> files in the python interpreter, but I'm concerned that if I create a
> distribution executable, this will break.

The easiest way to make sure that everything works as intended with
py2exe is to just compile a simple stub script into an executable (add
"." to sys.path and execfile your REAL application). Then just
manually include all the Python files you use into the distribution as
plain .py (or .pyc) files. This method works wonders with some of more
py2exe-hostile extensions too (like pyopengl).

The above method also has the benefit that you distribute very small
upgrade patches, since you don't need to regenerate and distribute the
executable and DLLs unless the stub script changes.

-- 
Sami Hangaslammi