Package twisted :: Package internet :: Module process :: Class ProcessWriter
[frames | no frames]

Class ProcessWriter

 Ephemeral --+    
             |    
    Logger --+    
             |    
FileDescriptor --+
                 |
                ProcessWriter


(Internal) Helper class to write into a Process's input pipe.

I am a helper which describes a selectable asynchronous writer to a process's input pipe, including stdin.
Method Summary
  __init__(self, reactor, proc, name, fileno)
Initialize, specifying a Process instance to connect to.
  connectionLost(self, reason)
See abstract.FileDescriptor.connectionLost.
  doRead(self)
The only way this pipe can become readable is at EOF, because the child has closed it.
  fileno(self)
Return the fileno() of my process's stdin.
  write(self, data)
Reliably write some data.
  writeSomeData(self, data)
Write some data to the open process.
    Inherited from FileDescriptor
  _postLoseConnection(self)
Called after a loseConnection(), when all data has been written.
  doWrite(self)
Called when data is available for writing.
  loseConnection(self)
Close the connection at the next available opportunity.
  pauseProducing(self)
  registerProducer(self, producer, streaming)
Register to receive data from a producer.
  resumeProducing(self)
  startReading(self)
Start waiting for read availability.
  startWriting(self)
Start waiting for write availability.
  stopConsuming(self)
Stop consuming data.
  stopProducing(self)
  stopReading(self)
Stop waiting for read availability.
  stopWriting(self)
Stop waiting for write availability.
  unregisterProducer(self)
Stop consuming data from a producer, without disconnecting.
  writeSequence(self, iovec)
    Inherited from Logger
  logPrefix(self)
Override this method to insert custom logging behavior.
    Inherited from Ephemeral
  __getstate__(self)
  __setstate__(self, state)

Class Variable Summary
int connected = 1                                                                     
int ic = 0                                                                     
    Inherited from FileDescriptor
tuple __implements__ = (<class twisted.internet.interfaces.IPr...
int bufferSize = 65536                                                                 
str dataBuffer = ''
int disconnected = 0                                                                     
int disconnecting = 0                                                                     
int offset = 0                                                                     
NoneType producer = None                                                                  
int producerPaused = 0                                                                     
int streamingProducer = 0                                                                     

Method Details

__init__(self, reactor, proc, name, fileno)
(Constructor)

Initialize, specifying a Process instance to connect to.
Overrides:
twisted.internet.abstract.FileDescriptor.__init__

connectionLost(self, reason)

See abstract.FileDescriptor.connectionLost.
Overrides:
twisted.internet.abstract.FileDescriptor.connectionLost

doRead(self)

The only way this pipe can become readable is at EOF, because the child has closed it.

fileno(self)

Return the fileno() of my process's stdin.
Overrides:
twisted.internet.abstract.FileDescriptor.fileno

write(self, data)

Reliably write some data.

If there is no buffered data this tries to write this data immediately, otherwise this adds data to be written the next time this file descriptor is ready for writing.
Overrides:
twisted.internet.abstract.FileDescriptor.write (inherited documentation)

writeSomeData(self, data)

Write some data to the open process.
Overrides:
twisted.internet.abstract.FileDescriptor.writeSomeData

Class Variable Details

connected

Type:
int
Value:
1                                                                     

ic

Type:
int
Value:
0                                                                     

Generated by Epydoc 2.0 on Sat May 15 20:08:56 2004 http://epydoc.sf.net