Archive for the ‘Programming’ Category

Coding for Nokia 770 using Python – Misc Notes

Tuesday, February 14th, 2006

It is time to make a post about some great input that I’ve gotten from the readers of my blog. Thanks to everyone who has made comments. Keep on commenting people.

Ok, first of all thanks to Kasper Souren for pointing out that if you are having “permission denied” problems, or otherwise problems running the downloaded scripts, you sould do a “chmod +x *.py” in the folder where you have the script in.

Also big thanks to Martin N for giving a nice example on how to make the python script fully hildonized by adding it to the start menu and also how to get the icon to the task list while your app is running. Here’s what he wrote…

Hi Teemu, I’ve found a solution in the Maemo SDK Tutorial:

Based on this I created the following two files for your example:

uitest.desktop:

[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Name=UITest
Exec=/home/user/python/uitest.py
X-Osso-Service=example.uitest
Icon=qgn_list_gene_default_app

example.uitest.service:

[D-BUS Service]
Name=example.uitest
Exec=/home/user/python/uitest.py

…and created those links:

ln -s /home/user/python/uitest.desktop \
/var/lib/install/etc/others-menu/extra_applications/\
uitest.desktop

ln -s /home/user/python/example.uitest.service \
/var/lib/install/usr/lib/dbus-1.0/services/\
example.uitest.service

Actually you don’t need the desktop file to have an icon in the task list, but I think it makes the hildonization complete. ;)

Edit: Please note that the version parameter in the .desktop file refers to the desktop entry specification version instead of the application version. Thanks to Karo for pointing this out.

Coding for Nokia 770 using Python – Part 2

Wednesday, February 8th, 2006

Ok, the hugely popular (a minor overstatement) “Coding for Nokia 770 using Python” tutorial continues. ;) The code for part 2 example is already 180 lines, but have no fear, I’ve included the example file for download and will also go through the code and try to explain what it does. Again the “tutorial” is about developing an user interface and the actual application doesn’t do anything useful. It is meant to be more of an example than actual application. Example shows how to create buttons, panels, text area, simple dialogs and a menu using pygtk and hildon.

Since everyone loves images, I’ve included an image of the application that the example creates. To read more, click the link below the image. The example code can be downloaded from here.

UITest part 2

(more…)

Nokia releases Python for Series 60 as open source

Wednesday, February 1st, 2006

Nokia has made the source code for Python for Series 60 available via Sourceforge.net. Let’s hope that many developers join the project to develop it further. Python for Series 60 is now in version 1.3.1 and it is quite usefull for fast mobile application development.

Coding for Nokia 770 using Python – Part 1

Thursday, January 26th, 2006

I thought that I start a series of posts giving some tips on how to get started to code applications for Nokia 770 using Python. I have some experience on coding Pyhon for Series 60 and now I’ve started to play with the Python for Maemo. My intention was to give some examples and hints how to easily develop software for Nokia 770. I’m still in the phase of learning how to use GTK/Hildon to implement user interfaces, so feel free to comment if I’m doing something totally wrong or if you have questions.

In this first part I thought that I’d give instructions how to set up an easy configuration so you can easily code Python on Nokia 770 using your PC and also very easily run your applications on the actual device. I’ll also give an example of a very simple Python application that you can see below. It’s not much, but it is a good start.

Simple Python example

(more…)

Python for Maemo 1.1 released

Tuesday, January 24th, 2006

Official Python for Maemo 1.1 has been released on pymaemo.sourceforge.net. This is first working version with an installer that I have seen. It comes with Python 2.4.2, Numerical Python 23.8, Pygame 1.6, PyGTK 2.6.1 and Python Hildon 0.6.0.

If you have ever felt like you would like to code something for Nokia 770 and felt like learning C-programming sounds too much work, here is your change. Go to python.org and read the Python 2.4.2 tutorial to learn how to code in Python. Just for practise it might be good idea to install Python runtime for Windows or whatever OS you are using and learn to use the basic Python libraries. There is lots of stuff readily implemented and you really can make cool applications without too much work. For testing graphical user interfaces (Gtk/Hildon) you need to use Nokia 770 or Maemo development environment that is only for Linux. I’ll be writing about my experienses of Python with Nokia 770 here on my blog as soon as I have done something worth telling about.

Python for Maemo 1.1

Finally a working python installer for Nokia 770

Wednesday, January 18th, 2006

Huh… I’ve waited this for some time. Actually as long as I have had the device. Now Bertrand Pivaty has done what I’ve been waiting from the pymaemo people, since I reported about the bug in their python installer that made it not to work on the real device. Bertnand has released a working python installer for Nokia 770. Good job…

WordPress 2.0 is near

Wednesday, December 21st, 2005

Release candidate 3 of WordPress 2.0 has been released. The final version should be out soon also. Its been while since I’ve updated my WordPress so maybe now its time to do that.

Nokia going open source

Wednesday, November 2nd, 2005

Today Nokia opened site called opensource.nokia.com. There isn’t much new on the site, since most of the stuff that is actually open source on that site has been that for some time already. Like for example Nokia’s Sofia SIP stack has been available already from sourceforge.net.

On the projects page, you can see the list of “open source” projects by Nokia. I wrote the open source in quotes since not all projects on the site are yet open source. Anyhow it’s really nice to see stuff like Python for Series 60 there so probably it will be soon open source as well.

Another interesting project is Series 60 OSS Browser. It’s still under development, but let’s hope we’ll get a decent browser for series 60 some day. Ok, ok…. Opera is quite good as well, but getting an open source browser for my phone would be too good to be true. ;)

Flickr Album

Friday, August 26th, 2005

I have made this WordPress plugin that loads your photos from Flickr and makes an album of them on your blog. Read more about it here. You can also see it in action in my photos section. At the moment it’s little limited in features, but I’ll keep on developing it. I will try to consentrate on easy installation and usage.

If you have problems intalling or using this, you can post comments in this blog entry. Also give your opinions on how good or bad it actually is and if someone is even using it, let me know.

Mosaickr version 0.001 Alpha

Friday, August 5th, 2005

Now I’ve gotten this far in my Python for Series 60 project. The app is called Mosaickr and you can see a pic of it below. At the moment it fetches a random picture from Flickr and then puts the picture into pieces. What I still need to do is to shuffle the pieces and make them move using arrow keys. When I get this ready I will put it on my site for download. Hopefully soon… ;)

mosaickr.png


blog.teemu.im is Digg proof thanks to caching by WP Super Cache