title: How to get the output of subprocess.check_output() python module?
body: <p>I'm trying to get information from a Command Prompt (CMD - Windows ) in python, using the module subprocess like this :</p>
  
  <pre><code>ipconfig = subprocess.check_output("ipconfig")
  print(ipconfig)
  </code></pre>
  
  <p>The result is:</p>
  
  <pre><code>b'\r\nWindows IP Configuration\r\n\r\n\r\nEthernet adapter Local Area Connect:\r\n\r\n   Connection-specific DNS Suffix  . : XX.XXX\r\n   IPv4 address. . . . . . . . . . . : XXXXXXXXX\r\n   Subnet Mask . . . . . . . . . . . : XXXXXXXXXX\r\n   Default Gateway . . . . . . . . . : XXXXXX\r\n'
  </code></pre>
  
  <p>I've read the documentation on <code>module subprocess</code> but I didn't find anything that fits my problem.</p>
  
  <p>I need this information in a nice formatted string ... not like that, what could I do?</p>
  
  <p>(I Think the problem here is a string format, but if you have tips for getting a nice output without needing of string formatting, I appreciate)</p>
  
  <p>I know that I can get IP address with socket module, but I'm just giving an example.</p>