Useful Python for Series 60 App: Dict2Go


Posted

in

, , ,

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’s 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.

Comments

141 responses to “Useful Python for Series 60 App: Dict2Go”

  1. Christopher Schmidt Avatar

    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. Matt Croydon Avatar

    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. luke barker Avatar
    luke barker

    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. luke barker Avatar
    luke barker

    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. Matt Croydon Avatar

    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. Matt Croydon Avatar

    Luke,

    Yeah that would indeed rock.

    –Matt

  7. Guaka Avatar

    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. blah Avatar
    blah

    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. Ravi Avatar
    Ravi

    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. 201 Avatar

    we are a wholesale Shoes provider

  11. 461 Avatar

    we provide buttons that for button wholesales

  12. file transfer cable…

    You can pick a movie or show and watch it anytime at your choosing….

  13. 450 Avatar

    [url=http://www.welkingroup.com.cn]welkin[/url][url=http://www.welkingroup.com.cn]ΰҵÃÀ¹úÓÐÏÞ¹«Ë¾[/url]Éú²úµÄ[url=http://www.welkingroup.com.cn/Product.asp]°ÐʽÁ÷Á¿¼Æ[/url]È«ÇòÊýÁ¿µÚÒ».

  14. 593 Avatar

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

  15. 392 Avatar

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

  16. solar warmwasser Avatar

    Sonnenkollektor oder auch Solarkollektor ist eine Vorrichtung zur Sammlung der im Sonnenlicht enthaltenen Energie. Traditionell steht die Bezeichnung für einen thermischen Solarkollektor, der mit der „eingefangenen“ Sonnenenergie ein Übertragungsmedium (Heizwasser) aufheizt, wobei nahezu das gesamte Strahlungsspektrum des Sonnenlichtes in thermischen Solaranlagen mit relativ hohem Wirkungsgrad ausgenutzt wird. Vorrichtungen zur Gewinnung von elektrischer Energie in Photovoltaikanlagen werden dagegen als Solarmodule bezeichnet.

  17. solarwaterheater Avatar

    Solar water heater or solar hot water is water heated by the use of solar energy. Solar heating systems are generally composed of solar thermal collectors, a water storage tank or another point of usage, interconnecting pipes and a fluid system to move the heat from the collector to the tank.

  18. aami classic Avatar

    Thank you for that wise critique. Me & my neighbour were preparing to do some research about that. We obtained a excellent book on that matter from our local library and most books exactly where not as influensive as your information and facts. I’m extremely glad to see these details which I was searching for a long time.

  19. raising biracial children Avatar

    Dude, please tell me that youre going to create additional. I notice you havent written an additional blog for a while (Im just catching up myself). Your weblog is just also important to become missed. Youve obtained so very much to say, this kind of knowledge about this subject it would be a shame to see this blog disappear. The internet needs you, man!

  20. high Avatar

    Thank you for that wise critique. Me & my neighbour were preparing to do some research about that. We got a good book on that matter from our local library and most books exactly where not as influensive as your information and facts. I’m really glad to see this kind of details which I was searching for a lengthy time.

  21. Silver Rings Avatar

    This was a seriously really very good publish. In theory I’d like to write like this also – getting time and actual effort to make a terrific piece of writing… but what can I say… I procrastinate alot and by no means appear to obtain a little something done.

  22. indian extramarital affairs Avatar

    I believed it was going to become some dull previous submit, but it seriously compensated for my time. I will post a link to this page on my weblog. I am positive my website visitors will discover that pretty useful.

  23. discounted designer fragrances Avatar

    I would like to thank you for the efforts you might have made in writing this write-up. I’m hoping the exact same finest work from you inside the long term also. In reality your inventive writing skills has inspired me to start my very own BlogEngine blog now.

  24. los angeles bartender Avatar

    What I wouldnt give to have a debate with you about this. You just say so many things that arrive from nowhere that Im fairly positive Id have a fair shot. Your weblog is wonderful visually, I mean people wont be bored. But others who can see past the videos and the layout wont be so impressed together with your generic understanding of this topic.

  25. Building Cleaning Companies Avatar

    Youre so right. Im there with you. Your blog is absolutely worth a read if anyone comes throughout it. Im lucky I did because now Ive received a whole new view of this. I didnt realise that this issue was so important and so universal. You undoubtedly put it in perspective for me.

  26. Vehicle Graphics Avatar

    I would like to thank you for the efforts you might have created in writing this write-up. I am hoping the exact same most effective get the job done from you in the long run too. In fact your creative writing abilities has inspired me to begin my personal BlogEngine weblog now.

  27. ereader Avatar

    Just a fast hello and also to thank you for discussing your ideas on this page. I wound up in your blog right after researching physical fitness connected issues on Yahoo… guess I lost track of what I had been performing! Anyway I’ll be back as soon as once more within the potential to examine out your blogposts down the road. Thanks!

  28. Gorilla safari Avatar

    Please tell me that youre heading to keep this up! Its so superior and so important. I cant wait to read extra from you. I just feel like you know so much and know how to make people listen to what you might have to say. This blog is just also cool to be missed. Great stuff, genuinely. Please, PLEASE keep it up!

  29. Free PS3 Move Avatar

    Thank you for an additional wonderful post. Exactly where else could anyone get that kind of facts in this kind of a ideal way of writing? I have a presentation next week, and I’m to the appear for such info.

  30. store game Avatar

    What I wouldnt give to have a debate with you about this. You just say so many things that arrive from nowhere that Im fairly certain Id have a fair shot. Your weblog is good visually, I mean people wont be bored. But others who can see past the videos and the layout wont be so impressed together with your generic understanding of this subject.

  31. katy perry songs Avatar

    I thought it was heading to become some boring old publish, however it seriously compensated for my time. I will submit a website link to this web page on my blog. I’m certain my visitors will find that incredibly useful.

  32. backroom casting couch blog woodman Avatar

    Sick! Just obtained a brand-new Pearl and I can now read your weblog on my phone’s browser, it didn’t work on my old 1.

  33. phone tracker Avatar

    Sick! Just received a brand-new Pearl and I can now read your blog on my phone’s browser, it didn’t get the job done on my previous 1.

  34. savings interest rates Avatar

    Verify you actually obtain the best finance interest rates when you’re opening up a savings account

  35. Lauri Avatar
    Lauri

    I need to know exactly what says about this!?

    Sweet and sour chicken recipe

  36. Kerry Avatar
    Kerry

    Hey , I doubt it!!

    dog grooming

  37. Travis Mcgee Avatar
    Travis Mcgee

    Hey , whatever dude..

    Sincere regards,

    humidors

  38. Colby Fountain Avatar
    Colby Fountain

    is the greatest??

    Yours Truly

    cigars

  39. Roscoe Avatar
    Roscoe

    is the greatest!!

    hamburg chat

  40. Margarita Vaughn Avatar
    Margarita Vaughn

    is the best!?!

    -Sincerest regards,

    logitech webcam treiber

  41. Tristan Bateman Avatar
    Tristan Bateman

    Gracie, that logic is flawed!?!

    chat ohne anmeldung

  42. Olga Bryant Avatar
    Olga Bryant

    Great writing, I have been after something like that…

    -Fondest Regards
    Bret

    erotik

  43. Fire Prevention Avatar

    We’re a gaggle of volunteers and starting a brand new scheme in our community. Your site offered us with helpful info to work on. You have performed a formidable process and our entire community will probably be grateful to you.

  44. Dale Dion Avatar

    Great site man, you have very useful content that’s actually happening in peoples’ lives these days haha.

  45. Kandy Duesing Avatar

    Nice site! A lot of info that’s very general and can go in all ways 🙂

  46. Deanna Haselton Avatar

    Nice site! A lot of info that’s very general and can go in all ways 🙂

  47. Patrica Shillito Avatar

    Awesome website, great information you got here lol it actually relates to the life I live..

  48. Carmel Schmidgall Avatar

    Nice site! A lot of info that’s very general and can go in all ways 🙂

  49. triple play Avatar

    You completed certain fine points there. I did a search on the matter and found most people will go along with with your blog.