This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Support Windows pseudoterminals in pty and termios modules
Type: enhancement Stage: test needed
Components: Library (Lib) Versions: Python 3.10
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: cs01, pradyunsg, steve.dower
Priority: normal Keywords:

Created on 2020-08-29 18:28 by cs01, last changed 2022-04-11 14:59 by admin.

Messages (2)
msg376071 - (view) Author: Chad Smith (cs01) Date: 2020-08-29 18:28
The pty and termios modules do not support Windows. Current Python pty documentation suggest Windows might be supported:

> The Linux code is supposed to work on other platforms, but hasn’t been tested yet.

but I have confirmed that it is not while adding pty usage to gdbgui.

The new Windows Psuedo Console, ConPTY, available in Windows 10, now makes this possible. 

Proof of existence of a common pty interface for all platforms exists for node with the node-pty npm package, which uses ConPTY.


References:

* ConPTY information, https://devblogs.microsoft.com/commandline/windows-command-line-introducing-the-windows-pseudo-console-conpty/
* Example ConPTY usage, https://github.com/microsoft/terminal/blob/master/samples/ConPTY/EchoCon/EchoCon/EchoCon.cpp
* node-pty, https://github.com/Microsoft/node-pty
* Python pty docs, https://docs.python.org/3/library/pty.html
* gdbgui Windows pty issue, https://github.com/cs01/gdbgui/issues/348
msg405911 - (view) Author: Pradyun Gedam (pradyunsg) * Date: 2021-11-07 20:00
https://github.com/spyder-ide/pywinpty might be relevant; although it's implemented in Rust.
History
Date User Action Args
2022-04-11 14:59:35adminsetgithub: 85829
2021-11-07 20:00:06pradyunsgsetnosy: + pradyunsg
messages: + msg405911
2020-09-04 22:51:47terry.reedysetstage: test needed
type: enhancement
components: + Library (Lib)
versions: + Python 3.10
2020-08-29 18:28:07cs01create