[XML-SIG] Two SimpleXMLRPCServer questions

Brian Quinlan brian@sweetapp.com
Mon, 10 Mar 2003 10:22:40 -0800


> I use ZODB to store the queue data.  I can't figure out how to pass
the
> ZODB file name in as a command parameter to the script. 

I don't know what you mean.

> The other question I have is how to make this server stop (and perhaps
> finish it's work) when someone presses a control-C in the console.

Hmmmm....the fact that this doesn't work better already is probably a
bug. 

Look at SimpleXMLRPCRequestHandler.do_POST. You might want to create
your own subclass and modify that method such that KeyboardInterrupts
set g_quit.

KeyboardInterrupts should work if other code in handle_request is
executing.

Cheers,
Brian