蟒蛇蓝牙发现与pybluez [英] python bluetooth discovery with pybluez

查看:624
本文介绍了蟒蛇蓝牙发现与pybluez的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图运行此脚本:

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 am getting a not implemented error in terminal. this is the out put that 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 anyone help me figure out what is going on and why the script won't run properly?

推荐答案

来源$ C ​​$ C对于的init 的.py

The source code for init.py has

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

源$ C ​​$ C对于osx.py

from btcommon import *

raise NotImplementedError

这是与网页,只提到Linux和Windows的实现是一致的。你可能会必须检查有关他们的路线图OSX支持开发者。

This is consistent with the web page that only mentions Linux and Windows implementations. You'll probably have to check with the developer about OSX support on their roadmap.

这篇关于蟒蛇蓝牙发现与pybluez的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆