Writing a small battleship game server in Python

googlenews at tooper.org googlenews at tooper.org
Thu Aug 11 13:03:04 EDT 2005


Why not using directly SOAP ?

A minimalistic 'Hello world' client looks like :

   from SOAPpy import SOAPProxy

   server= SOAPProxy("http://localhost:8080")
   print server.Hello("world")

and the server side like :

    from SOAPpy import SOAPServer

    def Hello(name):
	print "Wishing "+name+" hello !"
	return "Hello "+name

    server= SOAPServer(("localhost",8080))
    server.registerFunction(Hello)
    server.serve_forever()

Difficult to make it simpler isn't it ?




More information about the Python-list mailing list