Useful Python for Series 60 App: Dict2Go

Over the past few weeks I’ve been on the lookout for pure python modules that run on Python for Series 60. I have managed to make use of a few cryptography modules (including Rijndael, DES, and Blowfish) as well as parse tag soup using BeautifulSoup.

While I was able to highlight some pure python packages and modules that worked well on Series 60, I really wanted to put together a quick simple app that was actually useful. After searching around for modules and services that would be great to access from a mobile device, I fell in love with John Goerzen’s dictclient.py. The module is a consise and well documented client that speaks the dict protocol.

Using Goerzen’s module, I have put together a simple GUI using the native widgets provided by appuifw. I was able to knock out the app in a little under an hour or so first by prototyping using the wxPython-based PDIS Series 60 Compatability library on my Linux laptop. From there a few iterations of tweak, test, tweak on my N-Gage (which is great for this type of thing because of the USB cable). Until my GoPhone SIM shows up tomorrow I’m without non-WAP data, so Gustaf was kind enough to test and send me a few stacktraces before I fixed a stupid typo or two in my code.

Screenshots

Dict2Go Input Dict2Go Results

Installation

To use Dict2Go, you will need Python for Series 60 installed on your phone. If you have a 3650, 3600, N-Gage, or N-Gage QD you will want to snag PythonForSeries60_1stEd_SIS.zip. For newer phones (6600, 6620, 6630, 7610, etc) you are looking for PythonForSeries60_2ndEd_SIS1.0.1.zip. You will also need a way to put the library file dictclient.py in your Python libs directory. Christopher Schmidt sent in a much easier way to install dictclient.py:

For installing the dictclient.py, you can just send the file to your phone and install it as a Library module using the standard Python installer. There鈥檚 no reason to use Fexplorer or an MMC reader for that.

My way (the Taco way) is still an option, though it’s much harder than it could be. You can copy the files using an MMC card reader (or your N-Gage) or by transfering the file to your phone and using FExplorer. If you have installed Python on your MMC (which you should have), put dictclient.py in E:/System/libs. One the library is in place, you can either place dict2go.py in E:/System/apps/Python/my or just transfer it to your phone and install it from your inbox.

Download

Note: this is a quick but functional hack. I think that it’s quite useful in its current form, but I have lots of plans to make it more fault-tolerant and user friendly as well as add more features and functionality. With that out of the way, there are a few ways to download Dict2Go:

License

Dict2Go is released under the GPL, version 2 or greater, as is the dictclient.py library that does all of the hard work. A copy of the license can be found in the zip files and tarballs.

ToDo

As I’ve said before, this is a quick hack, but I like it. The dict server is currently hardcoded to talk to dict.org, but that can be changed by editing the source if you really want to. Dict2Go also grabs the first definition it finds. I hope to make both of these configurable in the future. I also have lots of plans for UI improvements including a main app loop so that you can look up as many words as you want until you are done. I will do my best to get new stuff out the door as quickly as possible.

15 Responses to “Useful Python for Series 60 App: Dict2Go”


  1. 1 Christopher Schmidt Apr 5th, 2005 at 10:09 am

    For installing the dictclient.py, you can just send the file to your phone and install it as a Library module using the standard Python installer. There’s no reason to use Fexplorer or an MMC reader for that.

    Of course, the best way to do this would be to actually build an application out of it: Rather than having the user need to move two things, package them both up in a .sis.

  2. 2 Matt Croydon Apr 5th, 2005 at 10:17 am

    Christopher,

    Hey thanks for the tip. I haven’t sent .py stuff over bluetooth in so long that I didn’t know about the install as library bit. I booted in to Windows to play with py2sis but couldn’t get it to work in 5-10 minutes of fiddling. It’s on my list of things to do though.

  3. 3 luke barker Apr 5th, 2005 at 4:37 pm

    great! i have also just tried installing it by just using opera to download it from the URLs and it seemed to go in fine.

    However I am guessing you need a GPRS connection to work the dict.org service, as it just gave me a timeout socket error line 218 (socket.py) for the connection. I use WAP as im in the UK and its free essentially, wehreas o2 refuse to do a deal on GPRS data that is not extortionate. : / Or is it sockets will only owrk with GPRS?

  4. 4 luke barker Apr 5th, 2005 at 4:40 pm

    also a great functionality would be to have predictive text work with the spelling too - is that possible? I have only seen Python apps use abc or Abc for the text input mode - maybe it cannot be accessed by Python yet. Then I can find out words meanings like antidisestablishmentarianism or Pres Bush could learn about ‘multi-tasking’

  5. 5 Matt Croydon Apr 5th, 2005 at 8:05 pm

    Luke,

    Yeah it requires GPRS. It works if you have GPRS access but not if you’re limited to WAP. This is the type of thing that I’d like to see pay-as-you-consume GPRS access at a few pennies a kilobyte.

  6. 6 Matt Croydon Apr 5th, 2005 at 8:08 pm

    Luke,

    Yeah that would indeed rock.

    –Matt

  7. 7 Guaka Apr 26th, 2005 at 6:04 pm

    I’m happy to see your Dict2Go exists, _and_ that’s it’s GPL! I’d like to hack a little dict server thingy (maybe based on serpento) so that mobile phones can actually have lots of useful information in them, without connecting (i.e. paying) to something external.

    You might wanna check out http://industree.org/guaka/index.php/wik2dict, a tool to convert Wikipedias and Wiktionaries into the dict format…

    Too bad I only have a UIQ phone… right now.

  8. 8 blah Jul 16th, 2005 at 7:14 pm

    Hi,
    Very nice. However, I think you need to check for no definitions being returned - this currently crashes the app. Adding a check “if defs” before setting text, and setting something like “Word not found” otherwise fixes this. Fixing this, reuploading and running then seeing it all work was rather fun; I’ve never really got anything to work on a mobile phone before :)

  9. 9 Ravi Aug 11th, 2006 at 2:37 am

    hey matt,

    its too good for the python developer who are really intersted in developing mobile application in S60 mobiles. i have tested it works fine any further devlopment in this

    regards
    ravi

  10. 10 201 Feb 20th, 2007 at 4:33 am

    we are a wholesale Shoes provider

  11. 11 461 Mar 26th, 2007 at 11:19 am

    we provide buttons that for button wholesales

  12. 12 450 Oct 29th, 2007 at 10:26 am

    [url=http://www.welkingroup.com.cn]welkin[/url][url=http://www.welkingroup.com.cn]伟业美国有限公司[/url]生产的[url=http://www.welkingroup.com.cn/Product.asp]靶式流量计[/url]全球数量第一.

  13. 13 593 Feb 18th, 2008 at 4:31 am

    This is a world of the Drawer Slide,Bolt,Hook

  14. 14 392 Jul 23rd, 2009 at 9:44 am

    Look for the world of the [url=http://www.solar-cell-panel.com/heating-air-conditioning-p-752.html]Heating

  1. 1 file transfer cable Trackback on Jul 26th, 2007 at 5:49 pm

Leave a Reply