leider bin ich zu blöd um das Beispielskript für Bluetooth (pybluez) zu nutzen.
pybluez habe ich natürlich installiert.
Ich nutze die unterstützte Version 2.4 mit installierten pybluez für 2.4.
Der Quelltext lautet wie folgt:
Code: Alles auswählen
from bluetooth import *
target_name = "My Phone"
target_address = None
nearby_devices = discover_devices()
for address in nearby_devices:
if target_name == lookup_name( address ):
target_address = address
break
if target_address is not None:
print "found target bluetooth device with address", target_address
else:
print "could not find target bluetooth device nearby"
Was mache ich bei meinem Import falsch?Traceback (most recent call last):
File "findmyphone.py", line 1, in ?
from bluetooth import *
File "C:\frei\code\python\bluetooth.py", line 6, in ?
AttributeError: 'module' object has no attribute 'discover_devices'
Vielen Dank schon mal fürs lesen und Grüße
Frank