Python applications do not appear under Windows CMD window
- 2020-04-02 13:41:27
- OfStack
Python GTK program, there will be such a strange phenomenon, originally under the CMD in python XXX. Py, fairly well, but after compiled using py2exe, reoccupy subprocess invocation command-line program, I found a black CMD jumped out of the window, particularly ugly, to get rid of it actually also is relatively easy, but to use a startupinfo parameters in this Windows only, the following are examples of Linux and Windows gm:
if os.name == 'nt':
startupinfo = subprocess.STARTUPINFO()
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
startupinfo.wShowWindow = subprocess.SW_HIDE
else:
startupinfo = None
subprocess.Popen( The command to run , startupinfo=startupinfo)
After today's modification, gmbox 0.2.4 beta is basically running in win, haha.