import os
import re
network_info = os.popen("netsh wlan show networks").read()
network_ssids = re.findall(r"SSID\s*\d+\s*:\s*(.+)", network_info)
print(network_ssids)
Этот код сработает на Windows import os
import re
network_info = os.popen("netsh wlan show networks").read()
network_info = network_info.encode('cp1252', 'ignore').decode('cp1252')
network_ssids = re.findall(r"SSID\s*\d+\s*:\s*(.+)", network_info)
print(network_ssids)
import os
import re
network_info = os.popen("netsh wlan show networks")
print(*network_info)