MCPcopy Index your code
hub / github.com/RustPython/RustPython / _supports_virtual_terminal

Function _supports_virtual_terminal

crates/vm/src/stdlib/nt.rs:129–136  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

127
128 #[pyfunction]
129 pub(super) fn _supports_virtual_terminal() -> PyResult<bool> {
130 let mut mode = 0;
131 let handle = unsafe { Console::GetStdHandle(Console::STD_ERROR_HANDLE) };
132 if unsafe { Console::GetConsoleMode(handle, &mut mode) } == 0 {
133 return Ok(false);
134 }
135 Ok(mode & Console::ENABLE_VIRTUAL_TERMINAL_PROCESSING != 0)
136 }
137
138 #[derive(FromArgs)]
139 pub(super) struct SymlinkArgs<'fd> {

Callers

nothing calls this directly

Calls 1

GetStdHandleFunction · 0.85

Tested by

no test coverage detected