How to connect / disconnect / configure wireless network in python?

I am looking to see if there is a way to connect or disconnect from a wireless network in python, it is desirable that it works for both public and secure networks if I provide a password. If I can configure the wireless network settings, this will be an additional bonus (for example, see All networks in the range, see Information about networks in the range (for example, encryption type)). I run a computer for Windows, so I see many answers to this question on Linux or other operating systems, but none of them on Windows. Thanks in advance.

+6
source share
1 answer

To do this, you probably have to use one of the DLLs in Windows. Using ctypes , you can access the win32 API with Python.

It looks like functions from wlanapi.dll starting with WlanOpenHandle and WlanEnumInterfaces can do what you want.

Edit: For example, code, see accepted answer.

+4
source

All Articles