Import PY file not included in py2exe executable

Larry Bates larry.bates at
Thu Oct 4 19:28:34 CEST 2007

ward.david at wrote:
> 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
> <misc Python pyds>
> Is this possible? What is the configuration for this?
I've found that using Inno Installer to package all the "other" stuff that I 
need works EXTREMELY well.  I almost always need .INI file, HISTORY.TXT, 
README.TXT, icons, etc.  Inno also allows me to ship a single setup.exe file 
that can install my program, make registry entries (if needed), create 
shortcuts, etc.  The time I spend installing and learning Inno has paid for 
itself many times over.

FYI, Larry

More information about the Python-list mailing list