SoFunction
Updated on 2024-11-13

Solve the problem of always displaying one more black DOS window after py2exe packaging.

:

#!/usr/bin/env python
# coding=utf-8
from  import setup
import py2exe
setup(
description = 'software',
version = '0.0.1',
console=[{"script": "", "icon_resources": [(1, "")]}],
options = {
'py2exe': {
'compressed': 1,
'optimize': 2,
'bundle_files': 2
}
}
)

where you change the console to windows, and repackage the

console=[{"script": "", "icon_resources": [(1, "")]}],
windows=[{"script": "", "icon_resources": [(1, "")]}],

Above this solution py2exe packaging, always show a DOS black window is more of a problem is all I share with you, I hope to give you a reference, but also hope that you support me more.