use subprocess.check_output instead of the deprecated os.popen
a bit more pep8 compliant