multiprocessing and accessing server's stdout

Martin P. Hellwig martin.hellwig at dcuktec.org
Fri May 28 19:47:18 EDT 2010


On 05/28/10 21:44, Adam Tauno Williams wrote:
> On Fri, 2010-05-28 at 15:41 +0100, Martin P. Hellwig wrote:
>> On 05/28/10 13:17, Adam Tauno Williams wrote:
>> <cut>
>>> You should be able to point it any any file-like object.  But, again,
>>> why?
>>> If you have the data in the process why send it to stdout and redirect
>>> it.  Why not just send the data to the client directly?
>> Well you might want to multiplex it to more then one client, not saying
>> that this is the case here, just something I imagine possible.
>
> That still doesn't make sense.  Why 'multiplex stdout'?  Why not just
> multiplex the data into proper IPC channels in the first place?

I am going on a stretch here, I mostly agree with you, just trying to 
illustrate that there could be corner cases where this is sensible.
The current situation could be that there is a client/server program 
(binary only perhaps) which is not multi-user safe.

Python can be used as a wrapper around the server to make it 
multi-client, by emulating the exact behavior towards the client, the 
client program does not have to be changed.

-- 
mph



More information about the Python-list mailing list