We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3dfed23 commit 6f2499aCopy full SHA for 6f2499a
Modules/posixmodule.c
@@ -16865,12 +16865,16 @@ static PyObject *
16865
os__supports_virtual_terminal_impl(PyObject *module)
16866
/*[clinic end generated code: output=bd0556a6d9d99fe6 input=0752c98e5d321542]*/
16867
{
16868
+#ifdef HAVE_WINDOWS_CONSOLE_IO
16869
DWORD mode = 0;
16870
HANDLE handle = GetStdHandle(STD_ERROR_HANDLE);
16871
if (!GetConsoleMode(handle, &mode)) {
16872
Py_RETURN_FALSE;
16873
}
16874
return PyBool_FromLong(mode & ENABLE_VIRTUAL_TERMINAL_PROCESSING);
16875
+#else
16876
+ Py_RETURN_FALSE;
16877
+#endif /* HAVE_WINDOWS_CONSOLE_IO */
16878
16879
#endif
16880
0 commit comments