Hey all, I'm trying to make a system call in Python and store the output to a string that I can manipulate in the Python program.
#!/usr/bin/python
import subprocess
p2 = subprocess.Popen("ntpq -p")
I've tried a few things including some of the suggestions here:
http://stackoverflow.com/questions/1996518/retrieving-the-output-of-subprocess-call
but without any luck.
Many thanks!