tools/litex_term: Set ENABLE_VIRTUAL_TERMINAL_PROCESSING flag on Windows.
This commit is contained in:
parent
bfc624f23e
commit
5babcadbed
|
@ -22,10 +22,14 @@ import telnetlib
|
|||
# Console ------------------------------------------------------------------------------------------
|
||||
|
||||
if sys.platform == "win32":
|
||||
import ctypes
|
||||
import msvcrt
|
||||
class Console:
|
||||
def configure(self):
|
||||
pass
|
||||
# https://stackoverflow.com/a/36760881
|
||||
# ENABLE_VIRTUAL_TERMINAL_PROCESSING
|
||||
kernel32 = ctypes.windll.kernel32
|
||||
kernel32.SetConsoleMode(kernel32.GetStdHandle(-11), 7)
|
||||
|
||||
def unconfigure(self):
|
||||
pass
|
||||
|
|
Loading…
Reference in New Issue