How can I parse all addresses and associated link quality values from iwlist into a dict using python?
<p>I want to create a dictionary of Addresses with associated RSSIs from iwlist wlan0 scan to use later in the script. I have saved the output to a file which looks something like this:</p>

<pre><code>wlan0     Scan completed :
      Cell 01 - Address: D8:5D:4C:AF:C3:14
                Channel:11
                Frequency:2.462 GHz (Channel 11)
                Quality=30/70  Signal level=-80 dBm  
                Encryption key:on
                ESSID:"phome"
                Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s
                          24 Mb/s; 36 Mb/s; 54 Mb/s
                Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 48 Mb/s
                Mode:Master
                Extra:tsf=00000004ab7e260e
                Extra: Last beacon: 71404ms ago
                IE: Unknown: 000570686F6D65
                IE: Unknown: 010882848B962430486C
                IE: Unknown: 03010B
                IE: Unknown: 2A0104
                IE: Unknown: 2F0104
                IE: Unknown: 32040C121860
                IE: Unknown: 2D1A7C181BFFFF000000000000000000000000000000000000000000
                IE: Unknown: 3D160B001300000000000000000000000000000000000000
                IE: Unknown: DD090010180203F4010000
                IE: Unknown: DD1E00904C337C181BFFFF000000000000000000000000000000000000000000
                IE: Unknown: DD1A00904C340B001300000000000000000000000000000000000000
</code></pre>

<p>On this occasion I have only picked up one cell however the purpose of the script is to pick up multiple cells and store their addresses and Signal levels in a dictionary</p>

<p>I have tried to customise the solution mentioned here <a href="https://bbs.archlinux.org/viewtopic.php?id=88967" rel="nofollow">https://bbs.archlinux.org/viewtopic.php?id=88967</a> however think there must be an easier way using the file and just extracting the two values from it.</p>
