Reputation: 85
I can connect to a WiFi network using:
process = subprocess.Popen(
'netsh wlan connect {0}'.format(wifi_network),
shell = True,
stdout = subprocess.PIPE,
stderr = subprocess.PIPE)
stdout, stderr = process.communicate()
I was wondering if there was a similar way to disconnect from a WiFi network? Either disconnecting from all WiFi networks or disconnecting from a specific network (given a name) would be fine.
Upvotes: 1
Views: 1306
Reputation: 844
Look at "netsh wlan disconnect": Netsh Commands for Wireless Local Area Network
Upvotes: 1