#!/usr/bin/env python # encoding: utf-8 # # Copyright (c) 2008 Doug Hellmann All rights reserved. # """ """ #end_pymotw_header import xmlrpclib class MyObj: def __init__(self, a, b): self.a = a self.b = b def __repr__(self): return 'MyObj(%s, %s)' % (repr(self.a), repr(self.b)) server = xmlrpclib.ServerProxy('http://localhost:9000') o = MyObj(1, 'b goes here') print 'o=', o print server.show_type(o) o2 = MyObj(2, o) print 'o2=', o2 print server.show_type(o2)