@staticmethod
    def compareH5Files(file1, file2):
        print "files to compare: ", file1, file2
        #have to spawn a subprocess, because h5diff has no wrapper in python
        
        cl = "h5diff -cv '" + file1 + "' '" + file2 + "'"
        args = shlex.split(cl)
        print args
        '''
        cl_header1 = "h5dump --header " + file1
        args_header1 = shlex.split(cl_header1)
        cl_header2 = "h5dump --header " + file2
        args_header2 = shlex.split(cl_header2)
        try:
            p1 = Popen(args_header1, stdout=PIPE, stderr=PIPE)
            out1, err1 = p1.communicate()
            p2 = Popen(args_header2, stdout=PIPE, stderr=PIPE)
            out2, err2 = p2.communicate()
            if out1 != out2:
                print "different header dumps"
                print out1
                print ""
                print out2
        except Exception, e:
            print e
            return False
        #print args
        '''
        try:
            p = Popen(args, stdout=PIPE, stderr=PIPE)
            stdout, stderr = p.communicate()
            if p.returncode >0:
                print stdout
                print stderr
                return False
            else :
                return True
            
        except Exception, e:
            print e
            return False
        return True
dataset/ETHPy150Open ilastik/ilastik-0.5/ilastik/core/testThread.py/TestHelperFunctions.compareH5Files/original