def set_pref(pref_name, pref_value):
    try:
        CFPreferencesSetValue(
                              pref_name, pref_value, BUNDLE_ID,
                              kCFPreferencesAnyUser, kCFPreferencesCurrentHost)
        CFPreferencesAppSynchronize(BUNDLE_ID)
    except Exception:
        pass
Sets a preference, writing it to
dataset/ETHPy150Open grahamgilbert/Crypt/Crypt/FVUtils.py/set_pref