@@ -2,8 +2,8 @@ |
|
|
2 |
2 |
======================================== |
3 |
3 |
|
4 |
4 |
.. module:: pty |
5 |
|
-:platform: Linux |
6 |
|
-:synopsis: Pseudo-Terminal Handling for Linux. |
|
5 |
+:platform: Unix |
|
6 |
+:synopsis: Pseudo-Terminal Handling for Unix. |
7 |
7 |
|
8 |
8 |
.. moduleauthor:: Steen Lumholt |
9 |
9 |
.. sectionauthor:: Moshe Zadka moshez@zadka.site.co.il |
@@ -16,9 +16,9 @@ The :mod:`pty` module defines operations for handling the pseudo-terminal |
|
|
16 |
16 |
concept: starting another process and being able to write to and read from its |
17 |
17 |
controlling terminal programmatically. |
18 |
18 |
|
19 |
|
-Because pseudo-terminal handling is highly platform dependent, there is code to |
20 |
|
-do it only for Linux. (The Linux code is supposed to work on other platforms, |
21 |
|
-but hasn't been tested yet.) |
|
19 |
+Pseudo-terminal handling is highly platform dependent. This code is mainly |
|
20 |
+tested on Linux, FreeBSD, and macOS (it is supposed to work on other POSIX |
|
21 |
+platforms but it's not been thoroughly tested). |
22 |
22 |
|
23 |
23 |
The :mod:`pty` module defines the following functions: |
24 |
24 |
|
@@ -47,6 +47,10 @@ The :mod:`pty` module defines the following functions: |
|
|
47 |
47 |
spawned behind the pty will eventually terminate, and when it does *spawn* |
48 |
48 |
will return. |
49 |
49 |
|
|
50 |
+ A loop copies STDIN of the current process to the child and data received |
|
51 |
+ from the child to STDOUT of the current process. It is not signaled to the |
|
52 |
+ child if STDIN of the current process closes down. |
|
53 |
+ |
50 |
54 |
The functions *master_read* and *stdin_read* are passed a file descriptor |
51 |
55 |
which they should read from, and they should always return a byte string. In |
52 |
56 |
order to force spawn to return before the child process exits an |