hide console window python code example
Example 1: python hide console
# pip install pywin32 -> This will install the libs that are required
import win32gui, win32con
hide = win32gui.GetForegroundWindow()
win32gui.ShowWindow(hide , win32con.SW_HIDE)
Example 2: how to hide command console python
import ctypes
ctypes.windll.user32.ShowWindow( ctypes.windll.kernel32.GetConsoleWindow(), 0 )