GammaPoint
August 18th, 2008, 03:38 AM
Hi, I'm trying to execute the UNIX command 'diff' from python and connect to it's output stream so that I can tell if the files differ. But I'm having some issues. I tried something simple like the following:
os.popen('diff file1 file2')
diff: standard output: Broken pipe
and then I was going to .readlines() from that resulting object.
But I got the following error message:
diff: standard output: Broken pipe
What am I doing wrong? Does anyone know how to do this with the newer subprocess module?
os.popen('diff file1 file2')
diff: standard output: Broken pipe
and then I was going to .readlines() from that resulting object.
But I got the following error message:
diff: standard output: Broken pipe
What am I doing wrong? Does anyone know how to do this with the newer subprocess module?