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

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -