meta data for this page
  •  

This is an old revision of the document!


def run_command(cmd):
    output = Popen(cmd, stdout=PIPE)
    return output.communicate()[0].decode("utf-8").split("\n")

see contextlib to catch other components stdout/stderr.

import subprocess
meta_data = subprocess.check_output(['netsh', 'wlan', 'show', 'profiles'])
data = meta_data.decode('utf-8', errors ="backslashreplace")