Skip to content

Commit 828d8ff

Browse files
committed
Connect sys.stderr with CONOUT$
1 parent da3f733 commit 828d8ff

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎src/core/sp_python.cpp‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,10 @@ bool CPythonManager::Initialize( void )
211211
if (stderr_.is_none())
212212
{
213213
DevMsg(1, MSG_PREFIX "stderr is None... reconnecting.\n");
214-
sys.attr("stderr") = sys.attr("__stderr__") = io_open("CONERR$", "wt");
214+
215+
// Use CONOUT$, because CONERR$ has no effect:
216+
// https://github.com/Source-Python-Dev-Team/Source.Python/issues/237
217+
sys.attr("stderr") = sys.attr("__stderr__") = io_open("CONOUT$", "wt");
215218
}
216219
}
217220
#endif

0 commit comments

Comments
 (0)