[maemo-developers] Python libosso bindings and ICd not working

From: Erik Walthinsen omega at vcolo.com
Date: Thu Mar 1 03:11:09 EET 2007
I've got a control panel app that must have a constant network connection in 
order to function (button press -> UDP packet).  For the moment I've faked 
up a wrapper script that uses a preload'd ping, but it's very lame and 
doesn't work consistently, which is not good in this situation.

I'm trying to use the libosso bindings to connect, and eventually listen to 
status_changed so I can reconnect and reinitialize my network sockets.  It's 
not even coming close to working ;-(

Figuring the bindings would be better, I started by grabbing the latest 
pymaemo2.5.  Then I tried the following script:

#!/usr/bin/env python

import osso
import gtk

osso_c = osso.Context("icconnect", "0.0.1", False)
osso_rpc = osso.Rpc(osso_c)
   retval = osso_rpc.rpc_run(
except Exception, inst:
   print "failed with exception "+repr(inst)
   print "retval is %s" % retval

I get the following error:

failed with exception SystemError('error return without exception set',)

AFAICT this is an internal Python error that means the bindings have a bug.

OTOH, calling "disconnect" with ("omegacs.net",) returns with "omegacs.net" 
and no error, but does nothing.

This is rather critical to my application, and any other potential Python 
program, so I would appreciate hints as to either what I'm doing wrong, or 
what in pymaemo needs to be worked on so it can function.

As a side note, I tried to use the DBus bindings directly, which also failed 
miserably.  I was told that Maemo's DBus doesn't support introspection, yet 
the python bindings will not function without introspection, making the 
bindings completely worthless.  Is this really true?

    aka Erik Walthinsen
    omega at vcolo.com

More information about the maemo-developers mailing list