Did you try df -h | grep YOUR_PTH | tr -s " " | cut -d -f6 in
a console to see if it works ? Also you could probably write
command = "df -h | grep %s | tr -s \" \" | cut -d -f6" % pth
proc = subprocess.Popen(command, shell = True, stdout=subprocess.PIPE, stderr = subprocess.PIPE)
out, err = proc.communicate()
instead of having 4 calls to Popen.
Gribouillis
Posting Maven
2,786 posts since Jul 2008
Reputation Points: 1,044
Solved Threads: 691