Newbie question

2005-10-25 Thread Geirr
Hi, ive just started playing around with python and wondered if someone
could poing me in the right way here.


I have a xmlrpc server simple script:

Server script:
import SimpleXMLRPCServer
class tpo:

def retTPOXML():
theFile=open('tpo.xml')
try:
self.strXML = theFile.read()
return self.strXML
finally:
theFile.close()

tpo_object = tpo()
server = SimpleXMLRPCServer.SimpleXMLRPCServer(("localhost",))
server.register_instance(tpo_object)

print "Listening on port "
server.serve_forever()

and im trying to print the return value with any luck

Client Code:
import xmlrpclib
server = xmlrpclib.ServerProxy("http://localhost:";)
current = server.retTPOXML
print current


Any comment would be appriciated

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Newbie question

2005-10-25 Thread Geirr
I obviously didnt read it good enough :) Tnxs anyway for extremly fast
response

-- 
http://mail.python.org/mailman/listinfo/python-list