Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- """
- First this checks if we already have a console. Then, if there is no console and attach parameter is set, it tries
- to attach to the console of any parent process. If that is not successful and the create parameter is set, it tries
- to create a new console. If that is not successful either, it fails.
- If a console was found, it will set the window title and redirect current output handles to this console.
- """
- std_out_handle = ctypes.windll.kernel32.GetStdHandle(STD_OUTPUT_HANDLE)
- has_console = std_out_handle > 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement