Exemple #1
0
def get_encry_table():
    command = ["/sbin/wpa_cli"]
    command.append("scan_results")
    wpa_output = map(lambda x: x.rstrip(), get_command_output(command))
    if not wpa_output:
        return {}
    striped = map(lambda l: l.split('\t'), wpa_output)[2:]
    table  = {}
    for line in striped:
        table[line[0]] =  line[3]
    return table
Exemple #2
0
def get_command_output(commands, in_shell=False):
    print "Please import deepin_utils.process.get_command_output, this function will departed in next release version."
    return process.get_command_output(commands, in_shell=False)
def get_proper_resolutions():
    output_lines = get_command_output("sudo hwinfo --framebuffer | grep Mode", True)
    output_str = join_all(output_lines)
    
    return collect_all_resolutions(output_str)
Exemple #4
0
def get_command_output(commands, in_shell=False):
    print "Please import deepin_utils.process.get_command_output, this function will departed in next release version."
    return process.get_command_output(commands, in_shell=False)