Advertisement
Guest User

Untitled

a guest
Apr 19th, 2019
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.55 KB | None | 0 0
  1.     """
  2.    First this checks if we already have a console. Then, if there is no console and attach parameter is set, it tries
  3.    to attach to the console of any parent process. If that is not successful and the create parameter is set, it tries
  4.    to create a new console. If that is not successful either, it fails.
  5.    If a console was found, it will set the window title and redirect current output handles to this console.
  6.    """
  7.     std_out_handle = ctypes.windll.kernel32.GetStdHandle(STD_OUTPUT_HANDLE)
  8.  
  9.     has_console = std_out_handle > 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement