Hello Every one!
Here is my sample code;
You will need xmlrpclib to run the code below; copy it from your python22 installation directory to your phone where you have the code below saved. you can place it in your phone memory or memory card. ped editor is recommended for running the code and making changes.
# First of All Create a server proxy for your xml rpc server
# The Xml rpc server in this case is "http://faali.wordpress.com/xmlrpc.php"
server = ServerProxy("http://faali.wordpress.com/xmlrpc.php")
# import the socket module of pys60
import socket
# Show a list of Access Points
apid = socket.select_access_point()
# get the selected access point
apo =socket.access_point(apid)
# set the access point as default
socket.set_default_access_point(apo)
# start the access point, so that it connects to the network and get its ip etc.
apo.start()
try:
# print the addTwoNumbers(1,2) and call the method on server which give us the output of 3
print 'addTwoNumbers(1,2) = ', server.demo.addTwoNumbers(1,2)
# call the supportedMethods() method of the server and print the supported methods
print 'supported methods: \n', server.mt.supportedMethods()
except Error, v:
print "ERROR", v
# stop the access point. if an error occurs
apo.stop()
apo.stop()
apid=None
apo=None
Above code is written by Fayyaz Ali and is Licensed under gnu gpl.