-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
293 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
Console reader | ||
============== | ||
|
||
.. automodule:: wexpect.console_reader | ||
|
||
|
||
ConsoleReaderPipe | ||
----------------- | ||
|
||
.. autoclass:: ConsoleReaderPipe | ||
|
||
.. automethod:: __init__ | ||
.. automethod:: read_loop | ||
.. automethod:: suspend_child | ||
.. automethod:: resume_child | ||
.. automethod:: refresh_console | ||
.. automethod:: terminate_child | ||
.. automethod:: isalive | ||
.. automethod:: write | ||
.. automethod:: createKeyEvent | ||
.. automethod:: initConsole | ||
.. automethod:: parseData | ||
.. automethod:: getConsoleOut | ||
.. automethod:: getCoord | ||
.. automethod:: getOffset | ||
.. automethod:: readConsole | ||
.. automethod:: readConsoleToCursor | ||
.. automethod:: interact | ||
.. automethod:: sendeof | ||
.. automethod:: create_connection | ||
.. automethod:: close_connection | ||
.. automethod:: send_to_host | ||
.. automethod:: get_from_host | ||
|
||
|
||
ConsoleReaderSocket | ||
------------------- | ||
|
||
.. autoclass:: ConsoleReaderSocket | ||
|
||
.. automethod:: __init__ | ||
.. automethod:: read_loop | ||
.. automethod:: suspend_child | ||
.. automethod:: resume_child | ||
.. automethod:: refresh_console | ||
.. automethod:: terminate_child | ||
.. automethod:: isalive | ||
.. automethod:: write | ||
.. automethod:: createKeyEvent | ||
.. automethod:: initConsole | ||
.. automethod:: parseData | ||
.. automethod:: getConsoleOut | ||
.. automethod:: getCoord | ||
.. automethod:: getOffset | ||
.. automethod:: readConsole | ||
.. automethod:: readConsoleToCursor | ||
.. automethod:: interact | ||
.. automethod:: sendeof | ||
.. automethod:: create_connection | ||
.. automethod:: close_connection | ||
.. automethod:: send_to_host | ||
.. automethod:: get_from_host |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
Host | ||
============= | ||
|
||
.. automodule:: wexpect.host | ||
|
||
Functions | ||
--------- | ||
|
||
.. automethod:: wexpect.host.run | ||
|
||
SpawnPipe | ||
--------- | ||
|
||
.. autoclass:: SpawnPipe | ||
|
||
.. automethod:: __init__ | ||
.. automethod:: expect | ||
.. automethod:: expect_exact | ||
.. automethod:: expect_list | ||
.. automethod:: compile_pattern_list | ||
.. automethod:: send | ||
.. automethod:: sendline | ||
.. automethod:: write | ||
.. automethod:: writelines | ||
.. automethod:: sendeof | ||
.. automethod:: read | ||
.. automethod:: readline | ||
.. automethod:: read_nonblocking | ||
|
||
|
||
SpawnSocket | ||
----------- | ||
|
||
.. autoclass:: SpawnSocket | ||
|
||
.. automethod:: __init__ | ||
.. automethod:: expect | ||
.. automethod:: expect_exact | ||
.. automethod:: expect_list | ||
.. automethod:: compile_pattern_list | ||
.. automethod:: send | ||
.. automethod:: sendline | ||
.. automethod:: write | ||
.. automethod:: writelines | ||
.. automethod:: sendeof | ||
.. automethod:: read | ||
.. automethod:: readline | ||
.. automethod:: read_nonblocking |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,88 @@ | ||
API documentation | ||
================= | ||
|
||
Wexpect symbols | ||
--------------- | ||
|
||
Wexpect package has the following symbols. (Exported by :code:`__all__` in code:`__init__.py`) | ||
|
||
.. _wexpect.spawn: | ||
|
||
**spawn** | ||
|
||
This is the main class interface for Wexpect. Use this class to start and control child applications. | ||
There are two implementation: :class:`wexpect.host.SpawnPipe` uses Windows-Pipe for communicate child. | ||
:class:`wexpect.SpawnSocket` uses TCP socket. Choose the default implementation with | ||
:code:`WEXPECT_SPAWN_CLASS` environment variable, or the :class:`wexpect.host.SpawnPipe` will be | ||
chosen by default. | ||
|
||
.. _wexpect.SpawnPipe: | ||
|
||
**SpawnPipe** | ||
|
||
:class:`wexpect.host.SpawnPipe` is the default spawn class, but you can access it directly with its | ||
exact name. | ||
|
||
.. _wexpect.SpawnSocket: | ||
|
||
**SpawnSocket** | ||
|
||
:class:`wexpect.host.SpawnSocket` is the secondary spawn class, you can access it directly with its | ||
exact name or by setting the :code:`WEXPECT_SPAWN_CLASS` environment variable to :code:`SpawnSocket` | ||
|
||
.. _wexpect.run: | ||
|
||
**run** | ||
|
||
:meth:`wexpect.host.run` runs the given command; waits for it to finish; then returns all output as a string. | ||
This function is similar to :code:`os.system()`. | ||
|
||
.. _wexpect.EOF: | ||
|
||
**EOF** | ||
|
||
:class:`wexpect.wexpect_util.EOF` is an exception. This usually means the child has exited. | ||
|
||
.. _wexpect.TIMEOUT: | ||
|
||
**TIMEOUT** | ||
|
||
:class:`wexpect.wexpect_util.TIMEOUT` raised when a read time exceeds the timeout. | ||
|
||
.. _wexpect.__version__: | ||
|
||
**__version__** | ||
|
||
This gives back the version of the wexpect release. Versioning is handled by the | ||
`pbr <https://pypi.org/project/pbr/>`_ package, which derives it from Git tags. | ||
|
||
.. _wexpect.spawn_class_name: | ||
|
||
**spawn_class_name** | ||
|
||
Contains the default spawn class' name even if the user has not specified it. The value can be | ||
:code:`SpawnPipe` or :code:`SpawnSocket` | ||
|
||
.. _wexpect.ConsoleReaderSocket: | ||
|
||
**ConsoleReaderSocket** | ||
|
||
For advanced users only! | ||
:class:`wexpect.console_reader.ConsoleReaderSocket` | ||
|
||
.. _wexpect.ConsoleReaderPipe: | ||
|
||
**ConsoleReaderPipe** | ||
|
||
For advanced users only! | ||
:class:`wexpect.console_reader.ConsoleReaderPipe` | ||
|
||
Wexpect modules | ||
--------------- | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
|
||
spawn_classes | ||
host | ||
wexpect_util | ||
console_reader |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
Wexpect util | ||
============ | ||
|
||
.. automodule:: wexpect.wexpect_util | ||
|
||
Functions | ||
--------- | ||
|
||
.. automethod:: wexpect.wexpect_util.str2bool | ||
.. automethod:: wexpect.wexpect_util.spam | ||
.. automethod:: wexpect.wexpect_util.init_logger | ||
.. automethod:: wexpect.wexpect_util.split_command_line | ||
.. automethod:: wexpect.wexpect_util.join_args | ||
|
||
ExceptionPexpect | ||
---------------- | ||
|
||
.. autoclass:: ExceptionPexpect | ||
|
||
EOF | ||
--- | ||
|
||
.. autoclass:: EOF | ||
|
||
TIMEOUT | ||
------- | ||
|
||
.. autoclass:: TIMEOUT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.