You can download the framework manually using:
import objc objc.loadBundle('CoreWLAN', bundle_path='/System/Library/Frameworks/CoreWLAN.framework', module_globals=globals())
Classes in the structure are now available in the module global dictionary.
Get wireless with
iface = CWInterface.interface()
Then you can turn the power on or off with:
iface.setPower_error_(True, None)
or
iface.setPower_error_(False, None)
PS I will add this structure in a future version, for the reason that it is not available at the moment, because I did not know that this is a public structure.
Ronald ussoren
source share