PICARD-1216: Do not allocate new console

This commit is contained in:
Philipp Wolfer
2018-08-28 13:29:06 +02:00
committed by Laurent Monin
parent f215d99960
commit 9c628ea47b

View File

@@ -10,7 +10,7 @@ import sys
# See https://stackoverflow.com/questions/54536/win32-gui-app-that-writes-usage-text-to-stdout-when-invoked-as-app-exe-help
if sys.platform == "win32":
from ctypes import windll
if windll.kernel32.AttachConsole(-1) or windll.kernel32.AllocConsole(-1):
if windll.kernel32.AttachConsole(-1):
sys.stdout = open('CON', 'w')
sys.stderr = open('CON', 'w')