def pref(pref_name):
    default_prefs = {
        'ServerURL': 'http://crypt',
        'CryptDir': '/usr/local/crypt',
        'NetworkCheck': True,
    }
    pref_value = CFPreferencesCopyAppValue(pref_name, BUNDLE_ID)
    if pref_value == None:
        pref_value = default_prefs.get(pref_name)
        # we're using a default value. We'll write it out to
        # /Library/Preferences/<BUNDLE_ID>.plist for admin
        # discoverability
        set_pref(pref_name, pref_value)
    if isinstance(pref_value, NSDate):
        # convert NSDate/CFDates to strings
        pref_value = str(pref_value)
    return pref_value
Return a preference. Since this uses CFPreferencesCopyAppValue,
dataset/ETHPy150Open grahamgilbert/Crypt/Crypt/FVUtils.py/pref