2007-04-01 17:02:05

by Robert Rawlins

[permalink] [raw]
Subject: [Bluez-users] Pyhton - ImportError: No module named dbus

Hello Chaps,

I took the Marcel's and started to try and play around with Python this afternoon. I've got the following code, from one of your tutorials i think Marcel.

#!/usr/bin/python
import dbus
bus = dbus.SystemBus();
obj = bus.get_object('org.bluez', '/org/bluez')
manager = dbus.Interface(obj,'org.bluez.Manager')
obj = bus.get_object('org.bluez', manager.DefaultAdapter())
adapter = dbus.Interface(obj, 'org.bluez.Adapter')
print adapter.GetName()
adapter.SetName('My Bluetooth dongle')

I have this file saved as 'test.py' which i then try and execute like 'python test.py' from my shell, but it throws back the error 'ImportError: No module named dbus'. I'm pretty sure this is nothing major, but being new to both python and dbus, i'm a little lost.

Thanks guys,

Rob
_________________________________________________________________
Try Live.com: where your online world comes together - with news, sports, weather, and much more.
http://www.live.com/getstarted


Attachments:
(No filename) (345.00 B)
(No filename) (164.00 B)
Download all attachments