Cool.. glad it works.  Just be careful not to expose methods you may not
want to; use decorators, attributes, or perhaps a custom method naming
scheme to flag methods as exposed if you do it this way.

On 9/27/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> On Sep 27, 5:08 pm, "Jeff McNeil" <[EMAIL PROTECTED]> wrote:
> > Yeah, that code was out of memory and I didn't test it, my apologies.
> > Need to actually return a value from _dispatch.
> >
> > class MyCalls(object):
> >    def _dispatch(self, method, args):
> >        try:
> >            return getattr(self, method)(*args)
> >        except:
> >            handle_logging()
> >
> > server = SimpleXMLRPCServer(("localhost", 8000))
> > server.register_instance(MyCalls())
> > server.serve_forever()
> >
>
> Thanks, that works.  I'm not sure why I didn't notice it wasn't
> returning anything.
>
> -Greg
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to