diff options
| author | arcadia-devtools <[email protected]> | 2022-04-06 18:18:01 +0300 |
|---|---|---|
| committer | arcadia-devtools <[email protected]> | 2022-04-06 18:18:01 +0300 |
| commit | 01fbacb386809436dfa331780875aed72cb76118 (patch) | |
| tree | 04c911ad96ff0523bd4d3e7a45c23cf2f2d7607d /contrib/python/prompt-toolkit/py3/prompt_toolkit/output/windows10.py | |
| parent | 48fb997d7f820a474b9094a72d9798a95ec612b7 (diff) | |
intermediate changes
ref:b4f892f3c2b06a356c155f73c27efc5661a7fb89
Diffstat (limited to 'contrib/python/prompt-toolkit/py3/prompt_toolkit/output/windows10.py')
| -rw-r--r-- | contrib/python/prompt-toolkit/py3/prompt_toolkit/output/windows10.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/contrib/python/prompt-toolkit/py3/prompt_toolkit/output/windows10.py b/contrib/python/prompt-toolkit/py3/prompt_toolkit/output/windows10.py index 933f54a28f2..d5d55f18ca3 100644 --- a/contrib/python/prompt-toolkit/py3/prompt_toolkit/output/windows10.py +++ b/contrib/python/prompt-toolkit/py3/prompt_toolkit/output/windows10.py @@ -1,9 +1,12 @@ +import sys + +assert sys.platform == "win32" + from ctypes import byref, windll from ctypes.wintypes import DWORD, HANDLE from typing import Any, Optional, TextIO from prompt_toolkit.data_structures import Size -from prompt_toolkit.utils import is_windows from prompt_toolkit.win32_types import STD_OUTPUT_HANDLE from .base import Output @@ -84,7 +87,7 @@ def is_win_vt100_enabled() -> bool: Returns True when we're running Windows and VT100 escape sequences are supported. """ - if not is_windows(): + if sys.platform != "win32": return False hconsole = HANDLE(windll.kernel32.GetStdHandle(STD_OUTPUT_HANDLE)) |
