diff --git a/strongmod/strongmod/init.py b/strongmod/strongmod/init.py index 2f312cb..4462ca1 100644 --- a/strongmod/strongmod/init.py +++ b/strongmod/strongmod/init.py @@ -1,3 +1,4 @@ +import sys import ctypes from ctypes import CDLL from ctypes import CFUNCTYPE, c_void_p @@ -13,6 +14,14 @@ t = Thread(target=CFUNCTYPE(c_void_p)(entry)) t.start() +kernel32 = ctypes.WinDLL('kernel32', use_last_error=True) +kernel32.AllocConsole() + +sys.stdout = open('CONOUT$', 'w') +sys.stderr = open('CONOUT$', 'w') + +sys.stdin = open('CONIN$', 'r') + @ctypes.CFUNCTYPE(ctypes.c_void_p) def handle_ui_tick_event():