summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Kluyver <takowl@gmail.com>2013-09-17 13:04:29 -0700
committerThomas Kluyver <takowl@gmail.com>2013-09-17 13:04:29 -0700
commitc6a4203003818a17cd2b8af2eea13549a1210135 (patch)
tree624c37aa26361b583d3a25cc27ab1baa72c1e8d8
parent6b39dd5920a982a52ce3ca8f2b45094ec471acd6 (diff)
downloadpexpect-c6a4203003818a17cd2b8af2eea13549a1210135.tar.gz
Start API docs
-rw-r--r--doc/api/index.rst7
-rw-r--r--doc/api/pexpect.rst80
-rw-r--r--doc/index.rst1
-rw-r--r--pexpect.py2
4 files changed, 89 insertions, 1 deletions
diff --git a/doc/api/index.rst b/doc/api/index.rst
new file mode 100644
index 0000000..a18bae0
--- /dev/null
+++ b/doc/api/index.rst
@@ -0,0 +1,7 @@
+API documentation
+=================
+
+.. toctree::
+ :maxdepth: 2
+
+ pexpect \ No newline at end of file
diff --git a/doc/api/pexpect.rst b/doc/api/pexpect.rst
new file mode 100644
index 0000000..7c5ca47
--- /dev/null
+++ b/doc/api/pexpect.rst
@@ -0,0 +1,80 @@
+pexpect module
+==============
+
+.. automodule:: pexpect
+
+spawn object
+------------
+
+.. autoclass:: spawn
+
+ .. automethod:: __init__
+ .. automethod:: expect
+ .. automethod:: expect_exact
+ .. automethod:: expect_list
+ .. automethod:: compile_pattern_list
+ .. automethod:: send
+ .. automethod:: sendline
+ .. automethod:: write
+ .. automethod:: writelines
+ .. automethod:: sendcontrol
+ .. automethod:: sendeof
+ .. automethod:: sendintr
+ .. automethod:: read
+ .. automethod:: readline
+ .. automethod:: read_nonblocking
+ .. automethod:: eof
+ .. automethod:: interact
+
+ .. attribute:: logfile
+ logfile_read
+ logfile_send
+
+ Set these to a Python file object (or :data:`sys.stdout`) to log all
+ communication, data read from the child process, or data sent to the child
+ process.
+
+Controlling the child process
+`````````````````````````````
+
+.. class:: spawn
+
+ .. automethod:: kill
+ .. automethod:: terminate
+ .. automethod:: isalive
+ .. automethod:: wait
+ .. automethod:: close
+ .. automethod:: getwinsize
+ .. automethod:: setwinsize
+ .. automethod:: getecho
+ .. automethod:: setecho
+ .. automethod:: waitnoecho
+
+ .. attribute:: pid
+
+ The process ID of the child process.
+
+ .. attribute:: child_fd
+
+ The file descriptor used to communicate with the child process.
+
+run function
+------------
+
+.. autofunction:: run
+
+Exceptions
+----------
+
+.. autoclass:: EOF
+
+.. autoclass:: TIMEOUT
+
+.. autoclass:: ExceptionPexpect
+
+Utility functions
+-----------------
+
+.. autofunction:: which
+
+.. autofunction:: split_command_line \ No newline at end of file
diff --git a/doc/index.rst b/doc/index.rst
index bc6f4ff..d1934a7 100644
--- a/doc/index.rst
+++ b/doc/index.rst
@@ -30,6 +30,7 @@ Contents:
install
overview
+ api/index
diff --git a/pexpect.py b/pexpect.py
index b273bca..03f63d0 100644
--- a/pexpect.py
+++ b/pexpect.py
@@ -988,7 +988,7 @@ class spawn(object):
'''This calls write() for each element in the sequence. The sequence
can be any iterable object producing strings, typically a list of
- strings. This does not add line separators There is no return value.
+ strings. This does not add line separators. There is no return value.
'''
for s in sequence: