Opening python bluetooth with pybluez

I am trying to run this script:

import PyOBEX import bluetooth print "performing inquiry..." nearby_devices = bluetooth.discover_devices(lookup_names = True) print "found %d devices" % len(nearby_devices) for name, addr in nearby_devices: print " %s - %s" % (addr, name) 

however I get an error not implemented in the terminal. this is what i get:

 Last login: Sat Dec 4 20:59:06 on ttys001 You have mail. cd '/Users/riceje7/School/NMD 430/' && '/usr/bin/pythonw' '/Users/riceje7/School/NMD 430/BluetoohLocator.py' && echo Exit status: $? && exit 1 Joseph-Rices-MacBook-Pro:~ riceje7$ cd '/Users/riceje7/School/NMD 430/' && '/usr/bin/pythonw' '/Users/riceje7/School/NMD 430/BluetoohLocator.py' && echo Exit status: $? && exit 1 Traceback (most recent call last): File "/Users/riceje7/School/NMD 430/BluetoohLocator.py", line 2, in <module> import bluetooth File "/Library/Python/2.6/site-packages/bluetooth/__init__.py", line 36, in <module> from osx import * File "/Library/Python/2.6/site-packages/bluetooth/osx.py", line 3, in <module> raise NotImplementedError NotImplementedError 

can someone help me figure out what is happening and why the script will not work properly?

+1
python bluetooth
source share
1 answer

The source code for init .py has

 elif sys.platform == "darwin": from osx import * 

And the source code for osx.py is

 from btcommon import * raise NotImplementedError 

This is consistent with a web page that only lists Linux and Windows versions. You may have to check with the developer for OSX support in your roadmap.

+3
source share

All Articles