xml-rpc module question

Jeff Kunce kuncej at mail.conservation.state.mo.us
Tue Dec 19 10:22:03 EST 2000


> I have taken the xml-rpc module and added the following to the call area:
>
> def CubeIt(x):
>    return x**3
>
> def call(self, method, params):
>    if method == 'CubeIt':
>    return CubeIt(params)
>

This is a wild guess, but did you define CubeIt() at the
global level of the module, or was it indented the same
as call() - making it a method of the RequestHandler class?

If the former, I'm not sure what the problem is.

If the latter, try:

    def CubeIt(self, x):
        return x**3

    def call(self, method, params):
        if method == 'CubeIt':
        return self.CubeIt(params)


  --Jeff






More information about the Python-list mailing list