Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(194)

Side by Side Diff: third_party/pexpect/doc/api/replwrap.rst

Issue 1398903002: Add third_party/pexpect (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@end-to-end-test
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/pexpect/doc/api/pxssh.rst ('k') | third_party/pexpect/doc/clean.css » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 replwrap - Control read-eval-print-loops
2 ========================================
3
4 .. automodule:: pexpect.replwrap
5
6 .. versionadded:: 3.3
7
8 .. autoclass:: REPLWrapper
9
10 .. automethod:: run_command
11
12 .. data:: PEXPECT_PROMPT
13
14 A string that can be used as a prompt, and is unlikely to be found in output.
15
16 Using the objects above, it is easy to wrap a REPL. For instance, to use a
17 Python shell::
18
19 py = REPLWrapper("python", ">>> ", "import sys; sys.ps1={!r}; sys.ps2={!r}")
20 py.run_command("4+7")
21
22 Convenience functions are provided for Python and bash shells:
23
24 .. autofunction:: python
25
26 .. autofunction:: bash
OLDNEW
« no previous file with comments | « third_party/pexpect/doc/api/pxssh.rst ('k') | third_party/pexpect/doc/clean.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698