summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTapple <mfulmer@cisco.com>2023-02-21 15:01:32 -0500
committerTapple <mfulmer@cisco.com>2023-02-21 15:01:32 -0500
commit31072de58b4d37a9895a35b28b3efbe12750b996 (patch)
tree44f0965d5ee1ef78f80c9a9481fbaf7538bcbb38
parentce99a6b49e150ccd72dc1696dab923b586f42c4c (diff)
downloadpexpect-31072de58b4d37a9895a35b28b3efbe12750b996.tar.gz
docs
-rw-r--r--doc/api/index.rst1
-rw-r--r--doc/api/socket_pexpect.rst20
-rw-r--r--pexpect/fdpexpect.py2
3 files changed, 23 insertions, 0 deletions
diff --git a/doc/api/index.rst b/doc/api/index.rst
index 5277d1c..747c812 100644
--- a/doc/api/index.rst
+++ b/doc/api/index.rst
@@ -6,6 +6,7 @@ API documentation
pexpect
fdpexpect
+ socket_pexpect
popen_spawn
replwrap
pxssh
diff --git a/doc/api/socket_pexpect.rst b/doc/api/socket_pexpect.rst
new file mode 100644
index 0000000..726a999
--- /dev/null
+++ b/doc/api/socket_pexpect.rst
@@ -0,0 +1,20 @@
+socket_pexpect - use pexpect with a socket
+==========================================
+
+.. automodule:: pexpect.socket_pexpect
+
+SocketSpawn class
+-----------------
+
+.. autoclass:: SocketSpawn
+ :show-inheritance:
+
+ .. automethod:: __init__
+ .. automethod:: isalive
+ .. automethod:: close
+
+ .. method:: expect
+ expect_exact
+ expect_list
+
+ As :class:`pexpect.spawn`.
diff --git a/pexpect/fdpexpect.py b/pexpect/fdpexpect.py
index cddd50e..6847d66 100644
--- a/pexpect/fdpexpect.py
+++ b/pexpect/fdpexpect.py
@@ -2,6 +2,8 @@
pass it. You are responsible for opening and close the file descriptor.
This allows you to use Pexpect with sockets and named pipes (FIFOs).
+..note:: socket.fileno() does not work on windows. Use `pexpect.socket_pexpect` for cross-platform socket support
+
PEXPECT LICENSE
This license is approved by the OSI and FSF as GPL-compatible.