Python

2008-01-22 Thread Sergio Galán
Hi
I'm new in the list and new in maemo programming. Nowadays i'm writing
python code related with widgets (hildon desktop plugins) and e-learning
cms.

But I have a problem. Following the example code that i found here:
https://stage.maemo.org/svn/maemo/projects/haf/branches/maemo-af-desktop/example-plugins/
I get this error when I try to load the hildon desktop plugin:

hildon-desktop[12352]: GLIB WARNING ** default - Unknown Plugin Loader type:
python
hildon-desktop[12352]: GLIB CRITICAL ** default -
hd_plugin_loader_set_key_file: assertion `loader' failed
hildon-desktop[12352]: GLIB WARNING ** default - Error loading plugin loader

My desktop desktop file look like this:
[Desktop Entry]
Name=My Plugin
Type=python
X-Path=myplugin


And i think that, inside my scratchbox, i've installed almost everthing with
the word python on the name.
So ¿Does anyone know where can be the problem? I've been looking for docs
but there isn't so much out there.

Thanks a lot.
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


undefined symbol: _Py_TrueStruct

2008-02-12 Thread Sergio Galán
Hi,
After some busy weeks, I've back to maemo plugin programming with python.
I used these packages (Thanks Benoit !)  but doesn't work for me in my N800.
Nothing happens and I don't know how to see error messages.
In scratchbox, I compiled the python desktop plugin loader following this
tutorial http://ianlawrence.info/random-stuff/hildon-python-plug-in-ide, and
I get this error when I try to load a home desktop plugin:


Traceback (most recent call last):
  File /usr/lib/hildon-desktop/homeip.py, line 1, in module
import gtk
  File /home/luwolf/release-jan/chinook/python-gtk2-2.12.1
/debian/python2.5-gtk2/usr/lib/python2.5/site-packages/gtk-2.0/gtk/__init__.py,
line 38, in module
  File /home/luwolf/release-jan/chinook/python-gobject-2.14.1
/debian/python2.5-gobject/usr/lib/python2.5/site-packages/gtk-2.0/gobject/__init__.py,
line 30, in module
  File /home/luwolf/release-jan/chinook/python-gobject-2.14.1
/debian/python2.5-gobject/usr/lib/python2.5/site-packages/gtk-2.0/gobject/constants.py,
line 22, in module
ImportError: /usr/lib/python2.5/site-packages/gtk-2.0/gobject/_gobject.so:
undefined symbol: _Py_TrueStruct


Does anyone know what's happening. I'm going mad...

Thanks.
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: undefined symbol: _Py_TrueStruct

2008-02-14 Thread Sergio Galán
Thanks, The code works, but only inside scratchbox, not in the N800.
In Scratchbox I see all the error messages so I can try to solve the
problems,  but, ¿Does someone know how to see error messages from graphical
applications which are running on the N800? It's a home desktop plugin, so I
can't run it from commandline...




 I had to apply this patch [1] to the loader to make it work. It uses
 g_module_open to load libpyhton2.5.so during the loader
 initialization.

 http://pastebin.com/f21f6605c

 --
 Lauro Moura
 INdT - Instituto Nokia de Tecnologia

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: undefined symbol: _Py_TrueStruct

2008-02-19 Thread Sergio Galán
It was something wrong with my N800, because now, magically,it works on N800
and  also in scratchbox:
I've uploaded a tgz with the deb packages compiled for i386 and armel

http://eclectico.net/python-hildondesktop-plugin-0.0.2.tar.gz


On Feb 18, 2008 6:19 PM, Lauro Moura [EMAIL PROTECTED] wrote:

 On 2/14/08, Sergio Galán [EMAIL PROTECTED] wrote:
  Thanks, The code works, but only inside scratchbox, not in the N800.
  In Scratchbox I see all the error messages so I can try to solve the
  problems,  but, ¿Does someone know how to see error messages from
 graphical
  applications which are running on the N800? It's a home desktop plugin,
 so I
  can't run it from commandline...
 
 

 Probably it's a typo in my patch: It should be libpython2.5.so.1.0,
 not only .so (which is inside -dev package).


 --
 Lauro Moura
 INdT - Instituto Nokia de Tecnologia

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Fwd: Control panel applet in maemo with python

2008-03-07 Thread Sergio Galán
I was reading the tutorial for writing Control panel desktop in maemo
 ( 
http://maemo.org/development/documentation/tutorials/maemo_4-0_tutorial.html#cpa
 ) But only mentions c, and looking for python bindings in google
couldn't find anything.
 ¿Does Someone know if its possible to program these applets in python?
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Get xid from hildon desktop home plugin using pygtk

2008-04-20 Thread Sergio Galán
Hi,
I'm working in a home Widget which can play video using an embedded
mplayer, so I need to get the xid. Using usual (py)GTK window I don't
have any problem.

...
class videoPlugin():
def __init__(self):
self.mwindow=gtk.Window(gtk.WINDOW_TOPLEVEL)
MplayerWidget=gtk.DrawingArea()
self.mwindow.add(MplayerWidget)
self.mwindow.show_all()

xid = MplayerWidget.window.xid


but if I use the same code on hildondesktop.HomeItem class:


...
class videoPlugin(hildondesktop.HomeItem):
def __init__(self):
MplayerWidget=gtk.DrawingArea()
self.add(MplayerWidget)
self.show_all()
xid = MplayerWidget.window.xid
...

I get an error:
xid = MplayerWidget.window.xid
AttributeError: 'NoneType' object has no attribute 'xid'


¿Does hildon-desktop-home-plugin have xid? ¿How can I read it?

Thanks
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers