Reputation: 11285
When trying to compile a GUI program using Py2Exe, whenever I load the GUI, a black box appears behind it.
Is there anyway to prevent this?
Upvotes: 0
Views: 115
Reputation: 47988
You need to use the windows option to Setup rather than the console option.
setup(
# windows = [RPMApp],
console = [RPMApp, DBMigrate],
zipfile = 'common.bin',
options = options,
data_files = files,
cmdclass = {'py2exe': FileCollector}
)
Here, I actually have the console enabled for debugging, but I'll uncomment the windows option when I finish building for deployment.
Upvotes: 2
Reputation: 52738
In your py2exe script, specify windows=['myscript.py'],
instead of console=['myscript.py'],
Like so:
setup(
windows=['myscript.py'],
options={
"py2exe":{
"unbuffered": True,
"optimize": 2,
}
}
)
Upvotes: 2