Beispiel #1
0
def GetPrefs(prefname, creator='Pyth'):
    import macostools, os
    if _prefscache.has_key(prefname):
        return _prefscache[prefname]
    # Find the preferences folder and our prefs file, create if needed.
    fsr = Folder.FSFindFolder(Folders.kOnSystemDisk, 'pref', 1)
    prefsfolder = fsr.as_pathname()
    path = os.path.join(prefsfolder, prefname)
    head, tail = os.path.split(path)
    # make sure the folder(s) exist
    macostools.mkdirs(head)

    preffile = PrefFile(path, creator)
    _prefscache[prefname] = preffile
    return preffile
Beispiel #2
0
def GetPrefs(prefname, creator = 'Pyth'):
    import macostools, os
    if _prefscache.has_key(prefname):
        return _prefscache[prefname]
    # Find the preferences folder and our prefs file, create if needed.
    fsr = Folder.FSFindFolder(Folders.kOnSystemDisk, 'pref', 1)
    prefsfolder = fsr.as_pathname()
    path = os.path.join(prefsfolder, prefname)
    head, tail = os.path.split(path)
    # make sure the folder(s) exist
    macostools.mkdirs(head)

    preffile = PrefFile(path, creator)
    _prefscache[prefname] = preffile
    return preffile
Beispiel #3
0
"""An attempt at an unweave script.
Beispiel #4
0
"""An attempt at an unweave script.