tichy : a python applets manager for openmoko
Guillaume Chereau
charlie at openmoko.org
Thu Jun 5 12:35:00 CEST 2008
Hello All !
I want to present a little project I have been working on recently.
The project is a python applets manager.
It allows users to write simple applications in python. Then they can
copy those applications in a specific directory, and the applet manager
will automatically load them.
Why do I think it is interesting :
- First, all the applets run into a single application. It makes
communication between applets very easy. For example, if an applet
offers a specific service (like a text editor), it can then be loaded
and used by any other applet, like a python function.
- All meta information about an applet (name, category, etc) can be
defined in the applet itself. So no need to deal with different files.
- Since the applets all have a python entry point, they can accept any
python objects as arguments, and also return python objects. This is
much better than normal applications, that can only get text arguments.
- The applets start faster than stand alone python applications, cause
they share the same python interpreter.
The bad points are :
- All the applets have to be written in python.
- Although all the applets will share the same look, they won't
necessary share it with the other applications on the cell phone.
- It will gives the impression that we use a system within the system.
- It may be too slow (but I believe that only rewriting the core classes
in C should make it fast enough)
Anyway, I did a very simple implementation of this applets manager, by
the name of tichy. You can download it there :
http://darshak.free.fr/tichy/tichy.tar.gz
It is easy to try it. You need :
- python 2.5
- python-pygame (for SDL backend)
- python-gobject (I only use it for the app main loop, could be
easily replaced)
then extract the archive and go into 'tichy/test', and type : 'python
test.py'
It should work on a normal desktop computer, but not yet on an OM (Well,
if you try hard it is possible -i did it-, but it is really slow. Many
things in the core should be rewritten in C first)
The applets are in the 'test/plugins' directory.
If you want to make it run faster, you can go into
'tichy/tichy/gui/geoc/' and type 'make'. It will try to generate the C
version of the vector and rect classes. It is recommended, because the
python version is really slow.
For the moment I use a very simple custom gui system, that relies on
SDL, but I want to stress out that the gui is not the interesting part
of the project. It could -and probably should- be replaced by something
else. Something fast. (etk for example).
There are several interesting concepts I used in the code. I'll discuss
it later on if people show interest in the project.
For now I would like to encourage people to try it out, and give me
there feed back.
Do you think there is a future for this application ? If so then i will
consider creating a git repository for it in projects.openmoko.org
Cheers,
- Charlie
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.openmoko.org/pipermail/openmoko-devel/attachments/20080605/3faf65aa/attachment.pgp
More information about the openmoko-devel
mailing list