def InstallDriver(kext_path):
 km = objc.KextManager()
 cf_kext_path = km.PyStringToCFString(kext_path)
 kext_url = km.dll.CFURLCreateWithFileSystemPath(objc.CF_DEFAULT_ALLOCATOR, cf_kext_path, objc.POSIX_PATH_STYLE, True)
 status = km.iokit.KextManagerLoadKextWithURL(kext_url, None)
 km.dll.CFRelease(kext_url)
 km.dll.CFRelease(cf_kext_path)
 if (status is not objc.OS_SUCCESS):
  raise OSError('Failed to load kext at {0}: {1}'.format(kext_path, status))

def InstallDriver ( kext_path ) : km = objc . KextManager ( ) cf_kext_path = km . PyStringToCFString ( kext_path ) kext_url = km . dll . CFURLCreateWithFileSystemPath ( objc . CF_DEFAULT_ALLOCATOR , cf_kext_path , objc . POSIX_PATH_STYLE , True ) status = km . iokit . KextManagerLoadKextWithURL ( kext_url , None ) km . dll . CFRelease ( kext_url ) km . dll . CFRelease ( cf_kext_path ) if ( status is not objc . OS_SUCCESS ) : raise OSError ( 'Failed to load kext at {0}: {1}' . format ( kext_path , status ) )
calls into the iokit to load a kext by file-system path .