使用pybluez的python蓝牙发现

使用pybluez的python蓝牙发现,python,bluetooth,Python,Bluetooth,我正在尝试运行以下脚本: 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" % (ad

我正在尝试运行以下脚本:

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)
然而,我在终端中得到一个未实现的错误。这是我得到的结果:

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
上次登录:ttys001上的12月4日星期六20:59:06
你有邮件。
cd'/Users/riceje7/School/NMD 430/'&&'/usr/bin/pythonw'/Users/riceje7/School/NMD 430/BluetoohLocator.py'&&echo退出状态:$?&&出口1
Joseph Rices MacBook Pro:~riceje7$cd'/Users/riceje7/School/NMD 430/'&&'/usr/bin/pythonw'/Users/riceje7/School/NMD 430/BluetoohLocator.py'&&echo退出状态:$?&&出口1
回溯(最近一次呼叫最后一次):
文件“/Users/riceje7/School/NMD 430/BluetoohLocator.py”,第2行,在
导入蓝牙
文件“/Library/Python/2.6/site-packages/bluetooth/_-init___.py”,第36行,在
从osx导入*
文件“/Library/Python/2.6/site packages/bluetooth/osx.py”,第3行,在
引发未实现的错误
未实现错误
有人能帮我弄清楚发生了什么以及为什么脚本不能正常运行吗?

问题是

这与只提到Linux和Windows实现的网页是一致的。您可能必须在开发人员的路线图上与他们核实OSX支持

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

raise NotImplementedError