Package twisted :: Package internet :: Module process :: Class ProcessWriter

[show private | hide private]
[frames | no frames]

## Class ProcessWriter

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

(Internal) Helper class to write to Process's stdin.

I am a helper which describes a selectable asynchronous writer to a process's stdin.

Method Summary
| ``__init__`(self, proc)` Initialize, specifying a Process instance to connect to.
| `__getstate__(self)` (inherited from `Ephemeral`)
| `__setstate__(self, state)` (inherited from `Ephemeral`)
| ``connectionLost`(self, reason)` See abstract.FileDescriptor.connectionLost.
| ``doRead`(self)` This does nothing.
| ``doWrite`(self)` Called when data is available for writing. (inherited from `FileDescriptor`)
| ``fileno`(self)` Return the fileno() of my process's stdin.
| `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)` Reliably write some data.
| `writeSequence(self, iovec)` (inherited from `FileDescriptor`)
| ``writeSomeData`(self, data)` Write some data to the open process.

Class Variable Summary
`int` | `connected`
`int` | `ic`

Method Details

### __init__(self, proc)
(Constructor)

Initialize, specifying a Process instance to connect to.

### connectionLost(self, reason)

See abstract.FileDescriptor.connectionLost.

### doRead(self)

This does nothing.

### fileno(self)

Return the fileno() of my process's stdin.

### 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.

Class Variable Details

### connected

  Type:
    `int`
  Value:

        1

### ic

  Type:
    `int`
  Value:

        0

Generated by Epydoc 1.1 on Sat Feb 15 21:17:52 2003 | http://epydoc.sf.net