import time
from types import TracebackType
from bluetooth import *
alreadyFound=[]
def findDevs():
foundDevs=discover_devices(lookup_names=True)
for (addr,name) in foundDevs:
if addr not in alreadyFound:
print("发现蓝牙设备: | "+str(name))
print("MAC: | "+str(addr))
alreadyFound.append(addr)
while True:
findDevs()
time.sleep(5)
