diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2014-03-30 16:03:44 -0400 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2014-03-30 16:03:44 -0400 |
| commit | d31fabf8cff5dae02e3fc759a4203bd374dddc99 (patch) | |
| tree | 888ec4e6d98154f862a3b9cd17a3394b657bc02e /boot/listwifi.py | |
| parent | 4182b5e096e081158dddd4ad5d031af94fcc63de (diff) | |
| download | jasper-client-d31fabf8cff5dae02e3fc759a4203bd374dddc99.tar.gz jasper-client-d31fabf8cff5dae02e3fc759a4203bd374dddc99.zip | |
Initial commit
Diffstat (limited to 'boot/listwifi.py')
| -rwxr-xr-x | boot/listwifi.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/boot/listwifi.py b/boot/listwifi.py new file mode 100755 index 0000000..5ee14de --- /dev/null +++ b/boot/listwifi.py @@ -0,0 +1,18 @@ +import os +import subprocess + +subprocess.call("iwlist wlan0 scan > temp.txt", shell = True) +output = open("temp.txt") + +lines = output.readlines() + +for index, line in enumerate(lines): + + if "Address" in line: + + address = line[29:-1] + name = lines[index + 1].split("\"")[1] + + print "%s is %s" % (address, name) + +os.system("rm temp.txt") |
