-
-
Save Yokii908/45481e83f21795200b18417bd86ca04f to your computer and use it in GitHub Desktop.
Get connected wifi SSID using python on Raspberry pi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess | |
try: | |
output = subprocess.check_output(['sudo', 'iwgetid']) | |
print("Connected Wifi SSID: " + output.split('"')[1]) | |
except Exception, e: | |
print e |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment