python 3.x - AttributeError: 'module' object has no attribute 'discover_devices' -


i use pybluez module, use of process of following error, reason, python version of 3.4.0, pybluez version of 0.22

the following source code:

import bluetooth  print("looking nearby devices...")     nearby_devices = bluetooth.discover_devices(lookup_names = true)     print("found %d devices" % len(nearby_devices))  addr, name in nearby_devices:                                                    print("%s-%s" % (addr,name))  def what_services(addr,name):     print("%s-%s" % (addr,name))      services in bluetooth.find_service(address = addr):         print("name: %s" %(services["name"]))         print("description: %s" %(services["description"]))         print("protocol: %s" %(services["protocol"]))         print("provider: %s" %(services["provider"]))         print("port: %s" %(services["port"]))         print("service id: %s" %(services["service-id"]))         print("")         print("") 

the screenshot pybluez contained in file

enter image description here


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -