Skip to content

Instantly share code, notes, and snippets.

@KenoLeon
Created April 22, 2022 00:07
Show Gist options
  • Select an option

  • Save KenoLeon/d0b81a28e8cad3a5cf85de984082f07f to your computer and use it in GitHub Desktop.

Select an option

Save KenoLeon/d0b81a28e8cad3a5cf85de984082f07f to your computer and use it in GitHub Desktop.
subprocess examples for wifi networs on the mac
import subprocess
# subprocess.run(["networksetup", "-help"])
# subprocess.run(["networksetup", "-listallhardwareports"])
# subprocess.run(["networksetup", "-listpreferredwirelessnetworks", "en0"])
subprocess.run(["airport", "en0", "--scan"])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment