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
Use ckeck_output method of subprocess
ckeck_output
subprocess
import subprocess address = 192.168.x.x res = subprocess.check_output(['ping', address, '-c', '3'])
Finally parse the string
for line in res.splitlines():
Hope it helps, happy coding