Package twisted :: Package internet :: Module stdio :: Class StandardIO
[show private | hide private]
[frames | no frames]

Class StandardIO

    Logger --+    
             |    
FileDescriptor --+
                 |
                StandardIO


I can connect Standard IO to a twisted.protocol.

I act as a selectable for sys.stdin, and provide a write method that writes to stdout.
Method Summary
  __init__(self, protocol)
Create me with a protocol.
  connectionLost(self, reason)
The connection was lost.
  doRead(self)
Some data's readable from standard input.
  doWrite(self)
Called when data is available for writing. (inherited from FileDescriptor)
  fileno(self)
File Descriptor number for select(). (inherited from FileDescriptor)
  log(self, bytes)
(inherited from Logger)
  logPrefix(self)
Override this method to insert custom logging behavior. (inherited from Logger)
  loseConnection(self)
Close the connection at the next available opportunity. (inherited from FileDescriptor)
  pauseProducing(self)
(inherited from FileDescriptor)
  registerProducer(self, producer, streaming)
Register to receive data from a producer. (inherited from FileDescriptor)
  resumeProducing(self)
(inherited from FileDescriptor)
  startReading(self)
Start waiting for read availability. (inherited from FileDescriptor)
  startWriting(self)
Start waiting for write availability. (inherited from FileDescriptor)
  stopConsuming(self)
Stop consuming data. (inherited from FileDescriptor)
  stopProducing(self)
(inherited from FileDescriptor)
  stopReading(self)
Stop waiting for read availability. (inherited from FileDescriptor)
  stopWriting(self)
Stop waiting for write availability. (inherited from FileDescriptor)
  unregisterProducer(self)
Stop consuming data from a producer, without disconnecting. (inherited from FileDescriptor)
  write(self, data)
Write some data to standard output.
  writeSequence(self, iovec)
(inherited from FileDescriptor)
  writeSomeData(self, data)
Write as much as possible of the given data, immediately. (inherited from FileDescriptor)

Method Details

__init__(self, protocol)
(Constructor)

Create me with a protocol.

This will fail if a StandardIO has already been instantiated.
Overrides:
twisted.internet.abstract.FileDescriptor.__init__

connectionLost(self, reason)

The connection was lost.
Overrides:
twisted.internet.abstract.FileDescriptor.connectionLost

doRead(self)

Some data's readable from standard input.

write(self, data)

Write some data to standard output.
Overrides:
twisted.internet.abstract.FileDescriptor.write

Generated by Epydoc 1.2 prerelease on Wed Jan 29 06:25:41 2003 http://epydoc.sf.net