Detect wireless devices connected to Raspberry Pi in python on Linux
<p>In my python code I need to get the list of "physical" WiFi network devices connected to Raspberry Pi</p>

<p>I've been doing this by calling:</p>

<pre><code>raw_output = check_output('iw dev', shell=True)
</code></pre>

<p>and then extracting all the data I need from <code>raw_output</code></p>

<p>It works ok, but in <code>iw help</code> it says that <code>Do NOT screenscrape this tool, we don't consider its output stable.</code> Is it really unsafe to get this data the way I did it? If yes, what is the correct way to do this?</p>