Example #1
0
 def getAppSuppDirs(inclNone = False):
     return getPrefsDirs(inclNone = inclNone)
Example #2
0
 def getAppSuppDirs(inclNone=False):
     return getPrefsDirs(inclNone=inclNone)
Example #3
0
    - Mac Classic: ?
    - unix: (depends on the flavor of unix)
    - Windows: C:\Documents and Settings\<username>
    """
    if PlatformName == 'win':
        return os.environ.get('USERPROFILE')
    else:
        return os.environ.get('HOME')

def getPrefsPrefix():
    """Return the usual prefix for the preferences file:
    '.' for unix, '' otherwise.
    """
    global PlatformName
    if PlatformName == 'unix':
        return '.'
    return ''


if __name__ == '__main__':
    print('PlatformName     = %r' % PlatformName)
    print('getHomeDir()     = %r' % getHomeDir())
    print('getPrefsPrefix() = %r' % getPrefsPrefix())
    print()
    for inclNone in (False, True):
        print('getAppDirs(%s)     = %r' % (inclNone, getAppDirs(inclNone)))
        print('getAppSuppDirs(%s) = %r' % (inclNone, getAppSuppDirs(inclNone)))
        print('getPrefsDirs(%s)   = %r' % (inclNone, getPrefsDirs(inclNone)))
    print('getDocsDir()         = %r' % getDocsDir())

Example #4
0
    - Mac Classic: ?
    - unix: (depends on the flavor of unix)
    - Windows: C:\Documents and Settings\<username>
    """
    if PlatformName == 'win':
        return os.environ.get('USERPROFILE')
    else:
        return os.environ.get('HOME')


def getPrefsPrefix():
    """Return the usual prefix for the preferences file:
    '.' for unix, '' otherwise.
    """
    global PlatformName
    if PlatformName == 'unix':
        return '.'
    return ''


if __name__ == '__main__':
    print('PlatformName     = %r' % PlatformName)
    print('getHomeDir()     = %r' % getHomeDir())
    print('getPrefsPrefix() = %r' % getPrefsPrefix())
    print()
    for inclNone in (False, True):
        print('getAppDirs(%s)     = %r' % (inclNone, getAppDirs(inclNone)))
        print('getAppSuppDirs(%s) = %r' % (inclNone, getAppSuppDirs(inclNone)))
        print('getPrefsDirs(%s)   = %r' % (inclNone, getPrefsDirs(inclNone)))
    print('getDocsDir()         = %r' % getDocsDir())