List Info

Thread: Pyhton - ImportError: No module named dbus




Pyhton - ImportError: No module named dbus
country flaguser name
United Kingdom
2007-04-01 12:02:05
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



Be one of the first to try Windows Live Mail. Windows Live Mail.
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )