Python syntax error with D-BUS 0.34
Thomas Leonard
tal at ecs.soton.ac.uk
Sun Jul 10 00:10:50 EST 2005
Hi all,
While updating ROX-Session to support D-BUS 0.34, I hit a problem with the
Python bindings:
$ python
Python 2.3.5 (#2, Jun 19 2005, 13:28:00)
>>> import dbus
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/local/lib/python2.3/site-packages/dbus/__init__.py", line 1, in ?
from _dbus import *
File "/usr/local/lib/python2.3/site-packages/dbus/_dbus.py", line 48, in ?
from services import *
File "/usr/local/lib/python2.3/site-packages/dbus/services.py", line 179
@method('org.freedesktop.DBus.Introspectable')
^
SyntaxError: invalid syntax
I was able to work around this with:
import empty
sys.modules['dbus.services'] = empty
(where 'empty.py' is an empty file)
It all seems to work OK now. However, it would be nicer if this wasn't
necessary. Perhaps 'services' could be made an optional import, so people
who don't need it don't have to import it? Currently, there's a
from services import *
in dbus/__init__.py, which doesn't really seem necessary.
--
Dr Thomas Leonard http://rox.sourceforge.net
GPG: 9242 9807 C985 3C07 44A6 8B9A AE07 8280 59A5 3CC1
More information about the dbus
mailing list