ubuntu+python蓝牙模块

简介: 安装:1、 sudo apt-get install libbluetooth-dev2、 sudo pip install pybluez

搜索蓝牙

#!/usr/bin/env python#--*--coding=utf-8--*--#P191#sudo pip install pybluezimporttimefrombluetoothimport*alreadyFound= []
deffindDevs():
foundDevs=discover_devices(lookup_names=True)
for(addr,name) infoundDevs:
ifaddrnotinalreadyFound:
print"[*] Found Bluetooth Device :  "+str(name)
print"[+] MAC address :  "+str(addr)
alreadyFound.append(addr)
whileTrue:
findDevs()
time.sleep(5)
目录
相关文章
|
5天前
|
监控 Ubuntu API
Python脚本监控Ubuntu系统进程内存的实现方式
通过这种方法,我们可以很容易地监控Ubuntu系统中进程的内存使用情况,对于性能分析和资源管理具有很大的帮助。这只是 `psutil`库功能的冰山一角,`psutil`还能够提供更多关于系统和进程的详细信息,强烈推荐进一步探索这个强大的库。
17 1
|
10天前
|
Java Serverless Python
探索Python中的并发编程与`concurrent.futures`模块
探索Python中的并发编程与`concurrent.futures`模块
15 4
|
22天前
|
API Python
python ratelimit模块
python ratelimit模块
|
22天前
|
Python
像导入Python模块一样导入ipynb文件
像导入Python模块一样导入ipynb文件
|
22天前
|
算法 Python
python tarfile模块
python tarfile模块
|
22天前
|
Python
如何在 Python 中导入模块
【8月更文挑战第29天】
20 1
|
22天前
|
Python
|
22天前
|
数据采集 JSON 算法框架/工具
我常用的几个经典Python模块
我常用的几个经典Python模块
|
22天前
|
开发者 Python
什么是 python 模块?
【8月更文挑战第29天】
11 0
|
22天前
|
API Python
python中copy模块的使用,深拷贝和浅拷贝
python中copy模块的使用,深拷贝和浅拷贝
14 0