在 python 中显示一组可用 wifi(SSID) 的代码

code to display set of avaliable wifi(SSID) in python

我一直在努力 python 以显示一组可用的 wifi (SSID),但我收到错误消息“接口不支持扫描” .. 我该怎么办?

from wifi import Cell, Scheme
Cell.all('wlan0')
cell = Cell.all('wlan0')[0]
scheme = Scheme.for_cell('wlan0', 'home', cell, passkey)
scheme.save()
scheme.activate()

scheme = Scheme.find('wlan0', 'home')
scheme.activate()

ifconfig eth1 up

iwlist eth1 s

试试这个,错误可能会得到解决。