Python syntax error with D-BUS 0.34

Thomas Leonard tal at
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/", line 1, in ?
    from _dbus import *
  File "/usr/local/lib/python2.3/site-packages/dbus/", line 48, in ?
    from services import *
  File "/usr/local/lib/python2.3/site-packages/dbus/", line 179
SyntaxError: invalid syntax

I was able to work around this with:

import empty
sys.modules[''] = empty

(where '' 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/, which doesn't really seem necessary.

Dr Thomas Leonard
GPG: 9242 9807 C985 3C07 44A6  8B9A AE07 8280 59A5 3CC1

More information about the dbus mailing list