|
Revision 28077, 0.9 KB
(checked in by exarkun, 7 months ago)
|
|
Apply stdio.patch to explicitly expose StandardIO in twisted.internet.stdio
Author: exarkun
Reviewer: khorn
Fixes: #4222
Add an __all__ to twisted.internet.stdio which includes StandardIO to make
it clear (to people and to automated tools) that StandardIO is the API that is
exported by this module.
|
| Line | |
|---|
| 1 | |
|---|
| 2 | |
|---|
| 3 | |
|---|
| 4 | |
|---|
| 5 | """ |
|---|
| 6 | Standard input/out/err support. |
|---|
| 7 | |
|---|
| 8 | This module exposes one name, StandardIO, which is a factory that takes an |
|---|
| 9 | IProtocol provider as an argument. It connects that protocol to standard input |
|---|
| 10 | and output on the current process. |
|---|
| 11 | |
|---|
| 12 | It should work on any UNIX and also on Win32 (with some caveats: due to |
|---|
| 13 | platform limitations, it will perform very poorly on Win32). |
|---|
| 14 | |
|---|
| 15 | Future Plans:: |
|---|
| 16 | |
|---|
| 17 | support for stderr, perhaps |
|---|
| 18 | Rewrite to use the reactor instead of an ad-hoc mechanism for connecting |
|---|
| 19 | protocols to transport. |
|---|
| 20 | |
|---|
| 21 | |
|---|
| 22 | Maintainer: James Y Knight |
|---|
| 23 | """ |
|---|
| 24 | |
|---|
| 25 | from twisted.python.runtime import platform |
|---|
| 26 | |
|---|
| 27 | if platform.isWindows(): |
|---|
| 28 | from twisted.internet._win32stdio import StandardIO |
|---|
| 29 | else: |
|---|
| 30 | from twisted.internet._posixstdio import StandardIO |
|---|
| 31 | |
|---|
| 32 | __all__ = ['StandardIO'] |
|---|