sending data to another process's input stream?
Joe Strout
joe at strout.net
Thu May 20 16:59:15 EDT 1999
In article <14148.28634.948802.403019 at amarok.cnri.reston.va.us>, Andrew
M. Kuchling <akuchlin at cnri.reston.va.us> wrote:
> The most frequent solution would be to use sockets, whether
> Unix or TCP/IP.
Ugh. I was afraid you'd say that. But what's the difference between
Unix and TCP/IP sockets? I poked around the Python library reference,
and found only "sockets" (no distinction).
> So, you could write a Python program that would be a long-lived
> server and accepted connections over a Unix or TCP/IP socket; CGIs
> would then talk to the server. (This is how Zope works, for example.)
> Your server could then just act as a front-end for a single
> long-running instance of the C++ program, sending output to the
> program's standard input.
Hmm... but that doesn't help, does it? Before, my question was how to
get the short-lived CGIs talking to my long-lived C++ program. With
your suggestion, the question is how to get the long-lived Python
server to talk to the long-lived C++ program. It's the same question,
is it not?
Put another way, how would I implement this part:
> Your server could then just act as a front-end for a single
> long-running instance of the C++ program
? Are sockets the way to go, or is there anything easier?
Thanks again,
-- Joe
--
,------------------------------------------------------------------.
| Joseph J. Strout Biocomputing -- The Salk Institute |
| joe at strout.net http://www.strout.net |
`------------------------------------------------------------------'
Check out the Mac Web Directory! http://www.strout.net/macweb.cgi
More information about the Python-list
mailing list