import subprocess;
beesrav = subprocess.Popen('compare -metric PSNR /home/crossteach/scr/w32bee/1.jpg /home/crossteach/scr/w32bee/2.jpg test.png; exit 0', shell=True,universal_newlines=True, stdout = subprocess.PIPE, stderr=subprocess.STDOUT);
st = beesrav.stdout.readline();
print(st);
i = float(st);
i = round(i);
i = int(i);
print(i);