We need py2exe to crawl through our main application, and bundle all of the imports, but not bundle the main application itself.
On 9/08/2011 11:46 AM, Adam Estes wrote:The above isn't clear to me - a working example is best - but it sounds like you want the 'exclude' option which is listed in the docs.
I changed optimize to 0 in my setup.py file and it fixed the not being
able to import .pyc.
When it compiles the .exe, it bundles our main application as well as
The pre_loader downloads the main application file (programmanager.pyc)
and then imports and it and initates run on it. If we compile the
preloader without the .py file for the main application, it fails at
running the application after it imports it.
Is there a way that we can remove the .py file when we run our
preloader, so the only existing version is the one outside of the
Also, be sure you delete the 'build' and 'dist' directories between trying various things, as stuff from an earlier build may still wound up being included.