import ctypes
whnd = ctypes.windll.kernel32.GetConsoleWindow()
if whnd != 0:
ctypes.windll.user32.ShowWindow(whnd, 0)
ctypes.windll.kernel32.CloseHandle(whnd)
引用自
http://magicpanda.net/2010/10/python%E4%B8%AD%E9%9A%90%E8%97%8Fconsole%E7%AA%97%E5%8F%A3/
Python3.4 控制台窗口隐藏
最新推荐文章于 2023-06-30 05:03:29 发布