import sys, os
X = os.system("ipconfig")
print X
0
I know its simple, I'm just starting python. How would I get X to equal the text that is printed out when I use ipconfig in a normal windows command prompt?
import sys, os
X = os.system("ipconfig")
print X
0
I know its simple, I'm just starting python. How would I get X to equal the text that is printed out when I use ipconfig in a normal windows command prompt?
you're looking for subprocess.check_output().