From 009ea10ecdc0c4fa5c2b05fe19722079db55b09d Mon Sep 17 00:00:00 2001 From: Thomas Kluyver Date: Tue, 22 Aug 2017 14:46:21 +0100 Subject: Add some more explanation about pexpect on Windows --- doc/overview.rst | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/overview.rst b/doc/overview.rst index d394ef1..eca8565 100644 --- a/doc/overview.rst +++ b/doc/overview.rst @@ -249,9 +249,19 @@ Pexpect on Windows Pexpect can be used on Windows to wait for a pattern to be produced by a child process, using :class:`pexpect.popen_spawn.PopenSpawn`, or a file descriptor, -using :class:`pexpect.fdpexpect.fdspawn`. This should be considered experimental -for now. +using :class:`pexpect.fdpexpect.fdspawn`. :class:`pexpect.spawn` and :func:`pexpect.run` are *not* available on Windows, as they rely on Unix pseudoterminals (ptys). Cross platform code must not use these. + +``PopenSpawn`` is not a direct replacement for ``spawn``. Many programs only +offer interactive behaviour if they detect that they are running in a terminal. +When run by ``PopenSpawn``, they may behave differently. + +.. seealso:: + + `winpexpect `__ and + `wexpect `__ + Two unmaintained pexpect-like modules for Windows, which work with a + hidden console. -- cgit v1.2.1