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)
try:
retval = osso_rpc.rpc_run(
"com.nokia.icd",
"/com/nokia/icd",
"com.nokia.icd",
"connect",
("omegacs.net",0),
True,
True)
except Exception, inst:
print "failed with exception "+repr(inst)
else:
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?
TIA,
Omega
aka Erik Walthinsen
[EMAIL PROTECTED]
_______________________________________________
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers