May-30-2017, 10:57 PM
Thank you very much!
Here you see that I have just coded
Here you see that I have just coded
def command_save(command): var = subprocess.check_output(command.split(), universal_newlines=True) output = open('scanning.txt', 'w') print(var, file=output) output.close() def scannig(): var = subprocess.check_output(['sudo', 'iwlist', 'scanning'], universal_newlines=True) output = open('scanning.txt', 'w') print(var, file=output) output.close() address = [] channel = [] essid = [] f = open('scanning.txt', 'r').readlines() for x in f: if "Address" in x: address.append(x) for x in f: if "Channel" in x: channel.append(x) for x in f: if "ESSID" in x: essid.append(x) address = ''.join(address) channel = ''.join(channel) essid = ''.join(essid) address = address.split() channel = channel.split() essid = essid.split()Now I cannot join address, channel, essid together them.