你需要先安装一些库
sudo apt-get install python-bluez bluetooth python-obexftp
最后那个python-obexftp我一直没有安装成功

搜索前你需要开启蓝牙,并且还要开放检测
以下这段代码意思是只进行一次搜索蓝牙设备
discover_devices()函数意思是将当前发现的所有蓝牙设备的mac地址存到一个数组里
lookup_name(deice)得到各个蓝牙设备的名字
但是你一旦运行这个程序之后出现no device
留作以后研究吧

from bluetooth import *
devList = discover_devices()
for device in devList:
	name = str(lookup_name(device))
	print "[+] Found Bluetooth Device " + str(name)
	print "[+] MAC address: " + str(device)