Raw Sockets vs. What?

Diez B. Roggisch deetsNOSPAM at web.de
Sat Dec 11 13:29:15 CET 2004


> So, the question: How to communicate between two instances of the
> python interpreter? Specifically, I need to pass the api and objects
> from bdb, the base class for the debugger. One interpreter runs the
> ide, the other the debugger and client code. We were talking and just
> opening a socket and doing the rest from there came up. This, to me,
> (admitedly a java guy) seems like a lot of work. If it were just
> setting breakppoints and stepping, well ok. But I also want to have
> introspection on the debugger side objects.
> 
> I could use raw sockets and write a bunch of stuff.
> 
> Does anyone have a suggestion about some pythonesque way to tackle
> this?

I've found pyro useful for a similar task: I fork, create a pipe and in the
child  I create a pyro daemon to run a remote object. The uri of that then
is passed using the pipe, so that the parent can get a reference to the
remote object.

I do the whole exercise due to not killable threads in python - so that I
can terminate the subprocess.

The nice thing about pyro is that it is like corba without the declartive
stuff - just use it. 

You also migh check out the eric ide - it has an out-of-process debugger, so
Detlev must have found a solution :)
-- 
Regards,

Diez B. Roggisch



More information about the Python-list mailing list