[EMAIL PROTECTED] wrote:
> Hello,
> 
> just to recap: last time I asked how to do an interprocess
> communitation, between one Manager process (graphical beckend) and
> some Worker processes.
> 
> I decided to go with sockets, thanks for replies, once more.
> 
> However, I would like to ask another thing: I would like to collect
> everyting what the Workers print and display in Manager. Or, redirect
> all Workers' stdout to stdio of Manager. If there was only one Worker
> I could use a pipe, right? But if there are more than one Worker, what
> to do? I found something called "named pipe" which seems rather
> complicated. Then I thought I could somehow (how?) create a fake
> (virtual) file object, redirect stdout of a Worket into it and from
> there send the data to Manager via sockets. Please, what do you think?

      Take a look at

        http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52296

which does this.  I wouldn'd do it quite that way; read the notes
on the article for some criticism.  But it's an approach that works.

      One can get fancier.  I wrote a system under QNX where each
real time process had its text output labeled, timestamped, and transmitted
using QNX interprocess communication to a lower priority logging process
on a different machine.  Text output never blocked; if a queue
filled, "..." appeared in the log file.  That's a special real-time situation.

                                John Nagle
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to