I am trying to write a script will return scan results similar to that of iw/iwlist. Currently I am using a subprocess and using iw.
When using the command
sudo iw wlan0 scan | egrep "SSID|signal|freq|channel"
I can get the information I need but parsing the results is a bit cumbersome. The aim of the script is to get these characteristics for all of the wifi signals picked up by the wifi card.
Is there was a python module that could get the SSID, rssi (signal), frequency and channel without having to use a subprocess and parse the results manually.