[Twisted-Python] R: Twisted Python on Nokia E71x (Running the phone Python Interpreter)

Date: Thu, 4 Mar 2010 15:57:43 -0600 From: Prince Riley <wmarketing3@gmail.com> Subject: [Twisted-Python] Twisted Python on Nokia E71x (Running the phone Python Interpreter) To: twisted-python@twistedmatrix.com Message-ID: <fa04eb751003041357o7ca889a9uc3985667c34731b0@mail.gmail.com> Content-Type: text/plain; charset="iso-8859-1"
Has anyone experimented with twisted-python on the Nokia E71x or E72 smartphones?
Prince Riley
Hi, I had tried to use Python for S60 (not Twisted, but standard socket module) writing a NNTP client, but I found many problem specially about networking. There is no high-layer abstraction layer for networking, so you have to implement all the logic from low level. I tried to use select (that may be useful for doing asynchronous networking apps), but is not working correctly on s60 phones. There is no porting for Twisted. My experience is that PyS60 is not mature for a production environment.

Hi I mostly diddled with the cam and automated uploading of pictures with simple JSON encoding over WLAN, and as I said, twisted is running with a few patches on the E61i.. Using putools http://people.csail.mit.edu/kapu/symbian/python.html helped a lot. Please find attached a tiny example with a very primitive server and a client counterpart using the standard socket API in python on the E61i. Although the pictures are lousy (the cam looses the white balance when the picture is taken) this code ran for days with no problem. So 'not ready for production' seems to me a bit too harsh as a judgment. Werner lormayna@libero.it wrote:
Date: Thu, 4 Mar 2010 15:57:43 -0600 From: Prince Riley <wmarketing3@gmail.com> Subject: [Twisted-Python] Twisted Python on Nokia E71x (Running the phone Python Interpreter) To: twisted-python@twistedmatrix.com Message-ID: <fa04eb751003041357o7ca889a9uc3985667c34731b0@mail.gmail.com> Content-Type: text/plain; charset="iso-8859-1"
Has anyone experimented with twisted-python on the Nokia E71x or E72 smartphones?
Prince Riley
Hi, I had tried to use Python for S60 (not Twisted, but standard socket module) writing a NNTP client, but I found many problem specially about networking. There is no high-layer abstraction layer for networking, so you have to implement all the logic from low level. I tried to use select (that may be useful for doing asynchronous networking apps), but is not working correctly on s60 phones. There is no porting for Twisted. My experience is that PyS60 is not mature for a production environment.
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
# jasstest.tac - controlling file for a single instance jass webapp # -*- coding: iso-8859-1 -*- # # author : Werner Thie, wth # last edit: 20.03.2009 # modhistory: # 20.03.2009 - wth, created import sys, os path = os.getcwd() sys.path.append(path) from twisted.python import log from twisted.python.log import ILogObserver, FileLogObserver from twisted.python.logfile import LogFile from twisted.internet import reactor from twisted.application import service, strports, internet from photoserver import gRSRC, JSONFactory application = service.Application("photoserver") application.setComponent(ILogObserver, FileLogObserver(LogFile('photoserver.log', '/var/log', rotateLength=10000000)).emit) gRSRC = JSONFactory() #site = server.Site(gRSRC) webserver = strports.service("tcp:9000", gRSRC) webserver.setServiceParent(application) #this main() is only used for debugging the server, this file should be run with twistd def main(): log.startLogging(sys.stdout) reactor.listenTCP(9000, gRSRC) #start only a basic service when debugging reactor.run() if __name__ == '__main__': main()

I don't use PUTools when developing for PyS60. The bluetooth console was nice, but recent versions of PyS60 ship with it already. My phone (6220 Classic) lets me do obex + bluetooth serial console at the same time so file sync is not a problem either. hth lvh

On a different note: has anyone figured out how to make the PyS60 GUI abstraction layer (appuifw) work with Twisted? Almost all of the API (the stuff that isn't stdlib) is non-blocking, but I have no idea how to make it work nicely with the Twisted reactor. So far I'm writing the app on it using just the stdlib but that's proving to be amazingly annoying (no way of doing ssl cert verification? really?) :-| Thanks in advance, Laurens
participants (3)
-
Laurens Van Houtven
-
lormayna@libero.it
-
Werner Thie