root/trunk/twisted/internet/stdio.py

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# -*- test-case-name: twisted.test.test_stdio -*-
2# Copyright (c) 2001-2010 Twisted Matrix Laboratories.
3# See LICENSE for details.
4
5"""
6Standard input/out/err support.
7
8This module exposes one name, StandardIO, which is a factory that takes an
9IProtocol provider as an argument.  It connects that protocol to standard input
10and output on the current process.
11
12It should work on any UNIX and also on Win32 (with some caveats: due to
13platform limitations, it will perform very poorly on Win32).
14
15Future 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
22Maintainer: James Y Knight
23"""
24
25from twisted.python.runtime import platform
26
27if platform.isWindows():
28    from twisted.internet._win32stdio import StandardIO
29else:
30    from twisted.internet._posixstdio import StandardIO
31
32__all__ = ['StandardIO']
Note: See TracBrowser for help on using the browser.