def _rpdb2_handler(sig, frame):
<get password somehow, maybe store it when the original script is
started...>
rpdb2.start_embedded_debugger(password)
Then, all you need to know is the pid of the process that you want to
debug. When you want to debug it, send it the signal, either from the
shell (you may need to print out signal.SIGUSR1 so you know what it
is. It is 30 on my machine.)
$ kill -30 pid
or from another python process
os.kill(pid, signal.SIGUSR1)
Then you can attach to this as usual.
I am not sure how portable this approach is, but it should work fine
on all *nix and Mac OS X based systems.
Michael.
On Nov 8 2009, 9:22 am, Henning Bredel <henningbre...@googlemail.com>
wrote: