Import PY file not included in py2exe executable

ward.david at comcast.net ward.david at comcast.net
Thu Oct 4 13:15:59 EDT 2007


I am using py2exe to generate an executable so that I can deliver my
scripts as a EXE. I have a couple of file that are needed by the
program that I do not want to include in the EXE because they are used
for program configuration (similar to the way an INI file is used.)
These file may change per installation, so I may need to edit them.
Having them wrapped up in the EXE just won't work for my needs.

I've used the 'exclude' option to keep them from being included in the
EXE. I'm also using 'zipfile=None' so that all of the other pys are
included in the EXE. So, when I deliver the EXE all I should have in
my installation directory is:

MyProgram.exe
config1.py
config2.py
<misc Python pyds>

Is this possible? What is the setup.py configuration for this?




More information about the Python-list mailing list