It turns out that Stream.poll always returns True with disk files.
I am searching for a good alternative.

Antoine.

On 24 avr. 2011, at 08:41, Tomer Filiba wrote:

> why not try and see?
> 
> 
> -tomer
> 
> An NCO and a Gentleman
> 
> 
> On Sun, Apr 24, 2011 at 07:27, Antoine Dechaume <[email protected]> wrote:
> Could the PipeStream class be used with files instead of pipes ?
> 
> Antoine.
> 
> 
> On 18 avr. 2011, at 15:53, Tomer Filiba wrote:
> 
>> as i said before, you can use two files (one for input, another for output) 
>> as the transport, i.e., you can write your own FileStream class that takes 
>> two files, where read() reads from the input file and write() writes to the 
>> output file. of course the two ends should connect to opposite files, e.g., 
>> if the client uses /tmp/f1 for input and /tmp/f2 for output, the server 
>> should use /tmp/f1 for output and /tmp/f2 for output. other than that, it 
>> should all work the usual way. note that there's no real "server" in this 
>> case, it's only two processes that communicate over these files (there's no 
>> need to "connect", only open a file).
>> 
>> you an also use pipes, of course. the PipeStream classes also uses two pipe 
>> objects (one for input, another for output). i can refer you to 
>> https://github.com/tomerfiliba/rpyc/blob/master/rpyc/core/stream.py#L139 and 
>> to 
>> https://github.com/tomerfiliba/rpyc/blob/master/rpyc/scripts/rpyc_classic.py#L151
>> 
>> 
>> -tomer
> 
> 

Reply via email to