diff options
author | Thomas Kluyver <takowl@gmail.com> | 2013-09-17 13:04:29 -0700 |
---|---|---|
committer | Thomas Kluyver <takowl@gmail.com> | 2013-09-17 13:04:29 -0700 |
commit | c6a4203003818a17cd2b8af2eea13549a1210135 (patch) | |
tree | 624c37aa26361b583d3a25cc27ab1baa72c1e8d8 /doc/api | |
parent | 6b39dd5920a982a52ce3ca8f2b45094ec471acd6 (diff) | |
download | pexpect-git-c6a4203003818a17cd2b8af2eea13549a1210135.tar.gz |
Start API docs
Diffstat (limited to 'doc/api')
-rw-r--r-- | doc/api/index.rst | 7 | ||||
-rw-r--r-- | doc/api/pexpect.rst | 80 |
2 files changed, 87 insertions, 0 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 |