How to find visible bluetooth devices in Python?
Question: I need to find the list of visible Bluetooth devices with their respective
details in the range of my Bluetooth modem. I only need to do Bluetooth 2.0
and below. I don't need to do Bluetooth 4.0.

Like you do on an Android phones using "Search for devices".

I'm sorry I can't give any code I tried because I don't know how to do
Bluetooth with python.


Answer: PyBluez link
[here](http://homepages.ius.edu/RWISMAN/C490/html/PythonandBluetooth.htm) and
[here](https://code.google.com/p/pybluez/):

    
    
    from bluetooth import *
    
    print "performing inquiry..."
    
    nearby_devices = discover_devices(lookup_names = True)
    
    print "found %d devices" % len(nearby_devices)
    
    for name, addr in nearby_devices:
         print " %s - %s" % (addr, name)
    

Another good link to
[here](http://www.robertprice.co.uk/robblog/2007/01/programming_bluetooth_using_python-
shtml/)

The importent thing is you can use `lookup_names = True`

from bluez Docs:

    
    
    if lookup_names is False, returns a list of bluetooth addresses.
    if lookup_names is True, returns a list of (address, name) tuples
    

**It's for python 2.6...** if you want for 2.7 you can find it
[here](http://www.lfd.uci.edu/~gohlke/pythonlibs/#pybluez)

