Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.

Archived:Getting tarted with blogging from PySymbian through xmlrpclib

From Wiki
Jump to: navigation, search

Archived.pngAquivado: Este artigo foi arquivado, pois o conteúdo não é mais considerado relevante para se criar soluções comerciais atuais. Se você achar que este artigo ainda é importante, inclua o template {{ForArchiveReview|escreva a sua justificativa}}.

All PySymbian articles have been archived. PySymbian is no longer maintained by Nokia and is not guaranteed to work on more recent Symbian devices. It is not possible to submit apps to Nokia Store.

Article Metadata
Created: anees042 (24 Sep 2008)
Last edited: hamishwillee (08 May 2013)

You will need xmlrpclib to run the code below; copy it from your Python 2.2 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.

Here is my sample code for Blogging from PySymbian through xmlrpclib.

# First of All Create a server proxy for your xml rpc server
# The Xml rpc server in this case is ""
server = ServerProxy("")
# 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
# start the access point, so that it connects to the network and get its ip etc.
# 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',
except Error, v:
print "ERROR", v
# stop the access point. if an error occurs

Additional information

Above code is written by Fayyaz Ali and is Licensed under gnu gpl.

This page was last modified on 8 May 2013, at 11:32.
18 page views in the last 30 days.