Python Bindings

Justin Mazzola Paluska jmp at MIT.EDU
Wed Aug 2 16:28:07 PDT 2006


On Wed, Aug 02, 2006 at 07:10:51PM -0400, Gary Cramblitt wrote:
> Hello,

I don't know about this error, but...

> Trying to build and install the dbus python bindings from latest git.
> 
> python setup.py build
<snip>
> but I'd rather know how to properly fix this.  
> 
> python setup.py install

But this one is caused by running python2.3   The D-Bus bindings
require Python 2.4.  So, re-run everything with Python 2.4:

	python2.4 setup.py build
	python2.4 setup.py install

> mostly worked except for this:
> 
> byte-compiling /usr/lib/python2.3/site-packages/dbus/service.py to service.pyc
>   File "/usr/lib/python2.3/site-packages/dbus/service.py", line 351
>     @method('org.freedesktop.DBus.Introspectable', in_signature='', 
> out_signature='s')
>     ^
> SyntaxError: invalid syntax
> 
> The caret is pointing to the "@" on my screen but email is wrapping it.
> 
> kde4 /home/share/src/dbus-python$ python -V
> Python 2.3.5
> kde4 /home/share/src/dbus-python$ pyrexc --version
> Pyrex version 0.9.4.1

The @ is a method decorator, which is new syntax in Python 2.4.

This is a pain if you're on Debian because it means you have to choose
between, say D-Bus on Python 2.4, and wx on Python 2.3.
	--Justin


More information about the dbus mailing list