#NEWLINE# def connected_devices( ) : #NEWLINE# #INDENT# "Fetches the dbus bluetooth database and returns a list of devices that have a connected value of '1'\n\n\tReturns:\n\t\tList of device objects. Each object is one device and consisting of the properties of that device.\n\t\t\t[\n\t\t\t\t{\n\t\t\t\t\t'alias': 'Bluetooth Keyboard',\n\t\t\t\t\t'address': '00:00:00:00:00:00',\n\t\t\t\t\t'rssi': '-54',\n\t\t\t\t\t'icon': 'input-keyboard',\n\t\t\t\t\t'paired': 1,\n\t\t\t\t\t'connected': 1\n\t\t\t\t}\n\t\t\t]\n\t" #NEWLINE# devices = gather_device_info ( ) #NEWLINE# connected = [ ] #NEWLINE# for device in devices : #NEWLINE# #INDENT# if device [ 'connected' ] : #NEWLINE# #INDENT# connected . append ( device ) #NEWLINE# #UNINDENT# #UNINDENT# return connected