The logic for checking if python modules are working has a logic error. It runs 3 tests not 2 so the check on IMPORT_BT!=2 should say IMPORT_BT!=3:
start on line 96:
IMPORT_BT=0
try:
import bluetooth
IMPORT_BT = IMPORT_BT+1
except:
pass
try:
import _bluetooth as bluez
IMPORT_BT = IMPORT_BT+1
except:
pass
try:
import bluetooth._bluetooth as bluez
IMPORT_BT = IMPORT_BT+1
except:
pass
if (IMPORTBT!=3):
print ("The program cannot import the module bluetooth.")
print ("Please make sure the bluetooth bindings for python as well as bluez are installed.")
print ("e.g. with Ubuntu Linux, type")
print _(" sudo apt-get install python-bluez")
The logic for checking if python modules are working has a logic error. It runs 3 tests not 2 so the check on IMPORT_BT!=2 should say IMPORT_BT!=3: start on line 96: IMPORT_BT=0 try: import bluetooth IMPORT_BT = IMPORT_BT+1 except: pass try: import _bluetooth as bluez IMPORT_BT = IMPORT_BT+1 except: pass try: import bluetooth._bluetooth as bluez IMPORT_BT = IMPORT_BT+1 except: pass if (IMPORTBT!=3): print ("The program cannot import the module bluetooth.") print ("Please make sure the bluetooth bindings for python as well as bluez are installed.") print ("e.g. with Ubuntu Linux, type") print _(" sudo apt-get install python-bluez")