Re: Debugging pipe IPC

2007-12-20 Thread Jim B. Wilson
Ian Clark wrote: > import os > os.system("netcat -l -p 1234 localhost") > > HTH, Nope, but the network theme got me thinking about how one might run Python on a remote host. After a few false starts, Googling "remote python shell" led me to Guido's "ripshell.py" (not *that* Guido, a diffe

Re: Debugging pipe IPC

2007-12-18 Thread Ian Clark
Jim B. Wilson wrote: > ... My fondest wish is to play the role of the child at the > good old ">>>" prompt. ... > > Jim Okay, I misunderstood the direction you wanted to go. I thought that you wanted to play the part of the mother, giving commands to the child and not the other way around. As

Re: Debugging pipe IPC

2007-12-18 Thread Jim B. Wilson
Ian Clark wrote: > ... whatever 'mother' was sending it ("Clean your room!" most like) :) > If it's very verbose ... Alas, it is quite verbose. Constructing a single instance of a class (from the Pyrex extension acting as the child's two-way radio) could involve tens of thousands of more-or-le

Re: Debugging pipe IPC

2007-12-18 Thread Ian Clark
Jim B. Wilson wrote: > Ian Clark wrote: >> Jim B. Wilson wrote: >> ... >>> The child/client sends requests on its stdout and receives responses >>> on stdin. >> So, why can't you just run this client on the command line and let the >> shell handle stdin/stdout for you? > > I'm not sure I underst

Re: Debugging pipe IPC

2007-12-17 Thread Jim B. Wilson
Ian Clark wrote: > Jim B. Wilson wrote: > ... >> The child/client sends requests on its stdout and receives responses >> on stdin. > > So, why can't you just run this client on the command line and let the > shell handle stdin/stdout for you? I'm not sure I understand the topology of your propo

Re: Debugging pipe IPC

2007-12-17 Thread Ian Clark
Jim B. Wilson wrote: ... > The child/client sends requests on its stdout and receives responses on > stdin. So, why can't you just run this client on the command line and let the shell handle stdin/stdout for you? Ian Clark -- http://mail.python.org/mailman/listinfo/python-list

Re: Debugging pipe IPC

2007-12-17 Thread Jim B. Wilson
Ian Clark pointed me to: > ... the cmd module. > Yes, I found that, but I could only get it to print a nice interactive prompt, "(Cmd)", read a line of input and discard it. Apparently, I'm too stupid to figure out how to hook it into python. Jim

Re: Debugging pipe IPC

2007-12-17 Thread Ian Clark
Jim B. Wilson wrote: > I have the mother (of all) application(s, written in C++) that > occasionally outsources certain tasks to a child Python script. The > mother fork/execs (or equivalent) the child and then begins serving the > child's requests. > > The child/client sends requests on its s

Debugging pipe IPC

2007-12-17 Thread Jim B. Wilson
I have the mother (of all) application(s, written in C++) that occasionally outsources certain tasks to a child Python script. The mother fork/execs (or equivalent) the child and then begins serving the child's requests. The child/client sends requests on its stdout and receives responses on