def filevaultStatus():
    p = subprocess.Popen(['/usr/bin/fdesetup','status'], stdout=subprocess.PIPE, stdin=subprocess.PIPE, stderr=subprocess.PIPE)
    stdout_data = p.communicate()[0]
    if stdout_data.strip() == "FileVault is Off.":
        NSLog(u"FileVault is Off.")
        return False
    else:
        NSLog(u"FileVault is Enabled.")
        return True
dataset/ETHPy150Open grahamgilbert/Crypt/Crypt/FVUtils.py/filevaultStatus/original