Communication between two programs on unix

Maciej Sobczak maciej at maciejsobczak.com
Wed Jan 22 03:51:14 EST 2003


Hi,

"morden" <morden at shadows.net> wrote in message
news:b0kvs0$o59$1 at bob.news.rcn.net...
> I want to connect the standard output of the tkinter app to the
stdin of
> the motif app to return results and connect stdout of motif app
to the
> input of the tkinter app. Is that doable?

If you really have to use only one single protocol or only one
single approach to communication (say, because it is mandated by
your boss), please ignore my post.

However, if your problem is not really connected to "stdin",
"stdout", "popen" and friends, but rather you are concerned "how
to make two apps communicate", then I encourage you to step back
and look at the problem with broader perspective. It may happen
that by going your initial path you will lose some better design
opportunities.

If you want your apps to communicate (just this), go for sockets
or follow my signature to find out if my library fits your needs.
Chances are it does (and it is much easier!). There are much
better ways to exchange messages than the low-level stuff you ask
for.

--
Maciej Sobczak
http://www.maciejsobczak.com/

Distributed programming lib for C, C++, Python & Tcl:
http://www.maciejsobczak.com/prog/yami/







More information about the Python-list mailing list