Return-Path: Message-ID: From: Robert Rawlins To: Date: Sun, 1 Apr 2007 17:02:05 +0000 MIME-Version: 1.0 Subject: [Bluez-users] Pyhton - ImportError: No module named dbus Reply-To: BlueZ users List-Id: BlueZ users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============0489267546==" Sender: bluez-users-bounces@lists.sourceforge.net Errors-To: bluez-users-bounces@lists.sourceforge.net --===============0489267546== Content-Type: multipart/alternative; boundary="_785c3890-08ea-4446-a2c8-e6cb008cfcf0_" --_785c3890-08ea-4446-a2c8-e6cb008cfcf0_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hello Chaps, =20 I took the Marcel's and started to try and play around with Python this aft= ernoon. I've got the following code, from one of your tutorials i think Mar= cel. =20 #!/usr/bin/python import dbus bus =3D dbus.SystemBus(); obj =3D bus.get_object('org.bluez', '/org/bluez') manager =3D dbus.Interface(obj,'org.bluez.Manager') obj =3D bus.get_object('org.bluez', manager.DefaultAdapter()) adapter =3D dbus.Interface(obj, 'org.bluez.Adapter') print adapter.GetName() adapter.SetName('My Bluetooth dongle') =20 I have this file saved as 'test.py' which i then try and execute like 'pyth= on test.py' from my shell, but it throws back the error 'ImportError: No mo= dule named dbus'. I'm pretty sure this is nothing major, but being new to b= oth python and dbus, i'm a little lost. =20 Thanks guys, =20 Rob _________________________________________________________________ Try Live.com: where your online world comes together - with news, sports, w= eather, and much more. http://www.live.com/getstarted= --_785c3890-08ea-4446-a2c8-e6cb008cfcf0_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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 tutori= als i think Marcel.
 
#!/usr/bin/python
import dbus
bus =3D dbus.SystemBus();
obj =3D bus.get_object('org.bluez', '/org/bluez')
manager =3D dbus.Interface(obj,'org.bluez.Manager') obj =3D bus.get_object('org.bluez', manager.DefaultAdapter()= )
adapter =3D dbus.Interface(obj, 'org.bluez.Adapter')<= BR> print adapter.GetName()
adapter.SetName('My Bluetooth dongle')
 
I have this file saved as 'test.py' which i then try and exe= cute like 'python test.py' from my shell, but it throws back the error 'Imp= ortError: 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. = --_785c3890-08ea-4446-a2c8-e6cb008cfcf0_-- --===============0489267546== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV --===============0489267546== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Bluez-users mailing list Bluez-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bluez-users --===============0489267546==--