Community: Blogs

你在这里: You Are Here: Olet tässä: Vous êtes ici: Sie befinden sich hier: Tu sei qui: 現在のページ: Você está aqui: Вы здесь: Usted está aquí:

Tasty Multimedia Journal's Forum Nokia Blog

My Tools for Python on S60 / N93 development

kevin_s2f | 13 June, 2007 01:04

Thanks to Jukka’s tips, during last week’s live session, I think I have my tools decisions made. Here are some are the considerations I brought to the process:
 
I expect and hope to have some cross-platform features, so I want my desktop tools to be as compatible with the mobile runtime as possible. PyS60 is based on Python 2.2.2. Result: I went to the Python download page and located Python 2.2.3. Release notes indicate this is (almost) exclusively a bug fix release, so that works.
I worked with the IDLE tool  that comes with the distribution. Without some help I could only stumble around a bit, but it seems workable. I like that it seems fairly bare-boned – that will help me establish a bit deeper understanding of the guts of the language than if I start right out with a fancy environment that does too much for me. Result: I’ll use Idle to finish my baby step work.
I’m about to head to Singapore for a couple of weeks, so I bought a couple of Python books to keep my occupied on the plane. Turns out the copy of Learning Python   by Lutz and Ascher is based on Python 2.2 – so that’s great.
The last consideration I’ve got is longer term. As I build this out I know I’m going to have C++ extensions involved. I’ve already got an Open C middleware piece I’m contemplating. Result: that means Carbide.c++, probably Express to start because it fits my budget, and the PyDev open source plug-in. 
That’s about it for today. Gotta go pack. Anyone headed to Nokia Connection, Forum Nokia Champion Day, or CommunicAsia, ping me.

Live Q & A: Using Python for S60 Platform to create multimedia wine tasting journal on Nokia N93

kevin_s2f | 07 June, 2007 01:04

Welcome everybody who is joining us today for a live session about using Python on S60, and in particular about how to use PyS60 for multimedia work. There will be nothing unusual about the way the site works during this session – so ask questions using the “Post Comment” link. Just remember to refresh your page frequently so you see the new content as it goes live.
 
A lot has happened in the few days since Jukka agreed to join us today. Before we start in with questions, let me recap some of the developments:
  • PyS60 1.3.22 was released last Friday. Note that even numbered releases (this one) refer to development releases while odd number releases are the stable ones. According to the release notes, 1.3.22 features improved performance, reduced code size and a better memory allocation mechanism. All users are recommended to upgrade !
    • NEW : experimental device binaries compiled with OMAP 2420 specific optimizations for N93 , N93i , N95 , E90 ( some benchmark results have increased over 300% !!! )  <<my note – sounds perfect for my N93 application>>
    • NEW : Pymalloc memory allocator has been backported from Python 2.5.1 into our codebase and tuned to free memory aggressively
    • NEW : The device binaries for 3rd edition are now compiled with RVCT. This improves both performance and code size.
    • NEW : For the first time now Text primitive work in 3rd ed !
  • A lot of the questions I thought I needed Jukka’s help with, were easily solved with the documentation available on line.
 
With the on-line documentation and about 5 hours of my time, I already have installed the necessary components on my N93, found some sample scripts to capture images and sounds, and run those scripts on the device. Not bad.
 
The resources that got me from there to here include:
 
The canonical source for all things PyS60: Jukka’s clarity and humor show through.
 
The Forum Nokia Wiki already has a great collection of Python How-tos, including code snippets for just about every aspect of my project:
 
 
So let’s recap the questions I had on Friday, and strip the list down to the ones I have not yet been able to answer on my own:
 
  • Overview
    • How do I work in Python?
      • What tools do I need?
        • for PyS60
        • How about working with PyS60 and Carbide.c++?
        • Turns out I don’t need to tackle that any time soon. I had expected to need to drop down into C++ to accomplish some of the multimedia control I wanted to handle. Turns out just about everything I want to do I can do within Python. Cool!
      • What downloads do I need?
      • The main PyS60 wiki includes a link to a detailed installation article which gives you all the info you need and a link to the Sourceforge page where you’ll find the files. For those of you not yet familiar with S60 3rd Edition security modes, make sure you install the “self-signed” package that Jukka already signed. The “unsigned free dev cert” SIS file allows you to sign the installation package yourself with a free developer certificate. If you don’t know what I mean by any of this, then you really don’t want to mess with it now. Just use the self-signed file.
      • Where are the best places to find PyS60 code samples?
      • For my purposes, the FN Wiki already has most of what I need. The PyS60 Wiki includes other sources.
    • How do I package and deploy PyS60?
      • related to Symbian Signing and security model
      • anything else I need to know
      • This is covered in the Wiki. Nothing I need to worry about for some time.
    • How valid is my initial view of PyS60 as being the "perfect" middle starting point?
      • Where, and only where, PyS60 does not provide access to required platform features, I drop down into C++
      • If the UI available in PyS60 is not sufficiently engaging I can wrap it all in a Flash Lite UI wrapper
  • My project specifics
    • multimedia control -- how much control over the camera do I have in PyS60 or can I pass to the user during image capture (for example, in Java, when I use the camera API it disables all user controls e.g. zoom, macro, etc.)
    • How about audio recording?
    • Both the multimedia issues are covered by code snippets in the FN Wiki. I think I’m good here, unless Jukka knows of pitfalls I haven’t seen yet.
    • And some portability issues -- it would be cool if some of the viewer portions of my project were usable on both the N93 and in a desktop environment running a Python interpreter. Can you point me to examples of PyS60 projects designed for portable from mobile to desktop? The marriage of PyS60 and OpenC is an obvious avenue in my mind, but I haven't seen any discussion to date.
    • Database and XML parsing were my primary considerations here, but I now see Python code snippets for db functionality should be straightforward. XML work  may be a bit more involved, but I think with SQL I probably don’t need XML. Maybe.

Live answers: Using Python for easy development of Nokia N93 application

kevin_s2f | 02 June, 2007 01:07

Good news! I was hoping yesterday to arrange a conversation about using Pyton on S60 to start the wine tasting journal. The conversation is arranged, and you’re invited.
 
Mr. PyS60, Jukka Laurila has agreed to discuss this project live on Thursday, June 7, at 18:00 Finnish time. That’s 16:00 in London, 11:00 in New York, and <apology> 23:00 in Beijing. </apology>
 
He pointed me to an interesting exercise  that Artem Marchenko's team did on rapid prototyping hybrid Python/C++ techniques with support from Jukka.
Update: I realized the link is only available if you're inside the Nokia firewall. Sorry.
 
If you’ve been curious about PyS60, here’s your chance to talk directly with the best resource you could possibly find. If your schedule does not permit you to attend, feel free to post your questions as comments to this post and we’ll try to address them in the thread. Here are some of the questions I plan to ask next week – talk to you then!
 
  • Overview
    • how do I work in Python?
      • What tools do I need?
        • for PyS60
        • How about working with PyS60 and Carbide.c++?
      • What downloads do I need?
      • Where are the best places to find PyS60 code samples?
    • how do I package and deploy PyS60?
      • related to Symbian Signing and security model
      • anything else I need to know
    • how valid is my initial view of PyS60 as being the "perfect" middle starting point?
      • Where, and only where, PyS60 does not provide access to required platform features, I drop down into C++
      • If the UI available in PyS60 is not sufficiently engaging I can wrap it all in a Flash Lite UI wrapper
  • My project specifics
    • multimedia control -- how much control over the camera do I have in PyS60 or can I pass to the user during image capture (for example, in Java, when I use the camera API it disables all user controls e.g. zoom, macro, etc.)
    • How about audio recording?
    • And some portability issues -- it would be cool if some of the viewer portions of my project were usable on both the N93 and in a desktop environment running a Python interpreter. Can you point me to examples of PyS60 projects designed for portable from mobile to desktop? The marriage of PyS60 and OpenC is an obvious avenue in my mind, but I haven't seen any discussion to date.

Use Python to write Wine Tasting Journal for Nokia N93

kevin_s2f | 01 June, 2007 01:05

I need to confess that my assumption is when something sounds too good to be true, it usually is too good to be true. But in the case of Python for S60, I may have found the exception that proves the rule. I’m still digging, and if you know of problems I do not yet see, please post comments. In the absence of warnings otherwise, I am continuing to investigate Python and here’s why:
 
I started with Alessandro’s post on Flyer . This led me to a Nokia open source wiki article that confirmed an earlier impression that I had about Python – it looks like the sweet spot between flexibility and complexity.
 
The problem I have been wrestling with is my desire to write in a high level language, but have deep access to multimedia functions. Paul suggested Java,  but with the currently available APIs I do not think I can control the camera sufficiently to capture the full text of a wine label, and without JNI capabilities I can’t drop out of Java to control the camera using C++ APIs.
 
I checked out Forum Nokia Champion Jürgen Scheible’s  web site  and saw some basic Python scripts for image capture. Looks promising. Python also offers the hope of developing viewing modules that run on the N93 and my desktop. Thinking ahead, I’m hoping that Open C may offer the same advantage as I start to work some of the data management issues.
 
Hartti’s post on S60 runtimes was another great resource. The challenge still comes back to access to full functionality, and I remember a presentation during the Forum Nokia Champion day in London, delivered by none other than Mr. Python himself, about how to extend Python by dropping down into C++ where necessary.
 
So that would appear to let be begin by writing my baby step application in Python. If Python does not allow me the degree of control I want of either the camera or audio recording, I can later “drop down” into C++ and code what I want.
 
And that brings me back to Alessandro’s post.. If I am not happy with the UI I can write in Python, it seems as though I can “fly up” into Flash Lite and wrap the whole package in a cool UI.
 
I may be dreaming here, but this seems possible. Start in the middle wht PyS60, drop down into C++ for functionality, and fly up into Flash Lite for the UI. Cool.
 
I am trying to schedule a call and maybe even a live blogging session with consultants within Nokia who will be able to answer these questions for me, and by extension answer the questions for you as well. I have seen some early traffic statistics for this new blogging track, and I see a lot of people are following along with me. Great. If you want to do more than follow silently, here’s your first big chance.
 
1)      Let me know what questions you want me to ask the mobile architects I’ll be talking to over the next several days.
2)      Let me know if your experience points to a problem I am not yet seeing.
3)      And check back here frequently so you can join in to the live session next week sometime, assuming I can get the experts on line.
 
 

Rate This

 
 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditFurlTechnocratiMagnoliaTwitter  Share this page Share this page Invite a friend Invite a friend
E-mail Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us Regional websites: Chinese Japanese © 2008 Nokia 
RDF Facets: qfnZtypeQUqfnTypeZBlogContentQ qfnZtypeQUqfnTypeZCommunityContentQ qfnZtypeQUqfnTypeZWebpageQ qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX