11.22.9 Example of Client Usage

Python 2.2

11.22.9 Example of Client Usage

# simple test program (from the XML-RPC specification)
from xmlrpclib import ServerProxy, Error

# server = ServerProxy("http://localhost:8000") # local server
server = ServerProxy("http://betty.userland.com")

print server

try:
    print server.examples.getStateName(41)
except Error, v:
    print "ERROR", v
See About this document... for information on suggesting changes.