L
Luca Sanna
the code is output the error of the ubuntu
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"
the error
luca@luca-XPS-M1330:~/py-temperature/py-temperature$ python bluetooth.py
Traceback (most recent call last):
File "bluetooth.py", line 14, in <module>
from bluetooth import *
File "/home/luca/py-temperature/py-temperature/bluetooth.py", line 19, in <module>
nearby_devices = discover_devices()
NameError: name 'discover_devices' is not defined
luca@luca-XPS-M1330:~/py-temperature/py-temperature$
it's a bug of the module? thanks
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"
the error
luca@luca-XPS-M1330:~/py-temperature/py-temperature$ python bluetooth.py
Traceback (most recent call last):
File "bluetooth.py", line 14, in <module>
from bluetooth import *
File "/home/luca/py-temperature/py-temperature/bluetooth.py", line 19, in <module>
nearby_devices = discover_devices()
NameError: name 'discover_devices' is not defined
luca@luca-XPS-M1330:~/py-temperature/py-temperature$
it's a bug of the module? thanks