benoitc/gaffer — pull request #6 by blackwithwhite666 (2012-11-16 05:25:46+00:00)
Title: Feature to pass custom streams to child process

In my project i need to pass new or existed stream from one process to another. Here is an example, how this task can be done:

```python
import pyuv
from gaffer.process import Process

loop = pyuv.Loop.default_loop()
channel = pyuv.Pipe(loop)
p = Process(loop, "someid", "worker", "some_program",
custom_streams=['ctrl'], custom_channels=[channel])
p.spawn()
stream = p.streams['ctrl']
stream.subscribe(lamda: evtype, info: None)
stream.write(b"msg")
loop.run()
```

Attributes added to process constructor:
- *custom_streams* used to create new stream;
- *custom_channels* used to pass existed streams.