title: How to open cmd and run ipconfig in python
body: <p>I would like to write a script that do something like that: open the cmd and run  the commend "ipconfig"  and than copy my ip and paste it to a text file.
  I wrote the beginning of the script but I didn't get the results that I wanted.
  Here is the start of the script:</p>
  
  <pre><code>import os
  f = os.system("cmd/ipconfig")
  </code></pre>
  
  <p>I got instead of getting the ipconfig output:</p>
  
  <pre><code>Microsoft Windows [Version 10.0.15063]
  ???(c) 2017 Microsoft Corporation. �� ������� ������.
  
  C:\Users\vespper\PycharmProjects\toturial&gt;
  </code></pre>