Did I find the right examples for you? yes no

All Samples(4)  |  Call(3)  |  Derive(0)  |  Import(1)
Return full path to the user-specific log dir for this application.

    "appname" is the name of application.
        If None, just the system directory is returned.
    "appauthor" (only required and used on Windows) is the name of the
        appauthor or distributing body for this application. Typically
        it is the owning company name. This falls back to appname.
    "version" is an optional version path element to append to the
        path. You might want to use this if you want multiple versions
        of your app to be able to run independently. If used, this(more...)

        def user_log_dir(appname=None, appauthor=None, version=None, opinion=True):
    r"""Return full path to the user-specific log dir for this application.

        "appname" is the name of application.
            If None, just the system directory is returned.
        "appauthor" (only required and used on Windows) is the name of the
            appauthor or distributing body for this application. Typically
            it is the owning company name. This falls back to appname.
        "version" is an optional version path element to append to the
            path. You might want to use this if you want multiple versions
            of your app to be able to run independently. If used, this
            would typically be ".".
            Only applied when appname is present.
        "opinion" (boolean) can be False to disable the appending of
            "Logs" to the base app data dir for Windows, and "log" to the
            base cache dir for Unix. See discussion below.

    Typical user cache directories are:
        Mac OS X:   ~/Library/Logs/
        Unix:       ~/.cache//log  # or under $XDG_CACHE_HOME if defined
        Win XP:     C:\Documents and Settings\\Local Settings\Application Data\\\Logs
        Vista:      C:\Users\\AppData\Local\\\Logs

    On Windows the only suggestion in the MSDN docs is that local settings
    go in the `CSIDL_LOCAL_APPDATA` directory. (Note: I'm interested in
    examples of what some windows apps use for a logs dir.)

    OPINION: This function appends "Logs" to the `CSIDL_LOCAL_APPDATA`
    value for Windows and appends "log" to the user cache dir for Unix.
    This can be disabled with the `opinion=False` option.
    """
    if sys.platform == "darwin":
        path = os.path.join(
            os.path.expanduser('~/Library/Logs'),
            appname)
    elif sys.platform == "win32":
        path = user_data_dir(appname, appauthor, version); version = False
        if opinion:
            path = os.path.join(path, "Logs")
    else:
        path = user_cache_dir(appname, appauthor, version); version = False
        if opinion:
            path = os.path.join(path, "log")
    if appname and version:
        path = os.path.join(path, version)
    return path
        


src/b/i/binstar-0.4.3/binstar_client/utils/__init__.py   binstar(Download)
SITE_CONFIG = join(appdirs.site_data_dir('binstar', 'ContinuumIO'), 'config.yaml')
USER_CONFIG = join(appdirs.user_data_dir('binstar', 'ContinuumIO'), 'config.yaml')
USER_LOGDIR = appdirs.user_log_dir('binstar', 'ContinuumIO')
 
def get_config(user=True, site=True):

src/p/y/PyXRD-0.5.4/pyxrd/data/settings.py   PyXRD(Download)
import os
from pyxrd.__version import __version__
from appdirs import user_data_dir, user_cache_dir, user_log_dir
 
### General Information ###
BGSHIFT = True
 
LOG_FILENAME = os.path.join(user_log_dir('PyXRD'), 'errors.log')
 
### The URL where PyXRD looks for updates & the online manual ###
    ("DEFAULT_DATA", "./", None),
    ("USER_DATA", user_data_dir('PyXRD'), None),
    ("LOG_DIR", user_log_dir('PyXRD'), None),
    ("CACHE_DIR", user_cache_dir('PyXRD'), None),
    ("DEFAULT_PHASES", "default phases/", "USER_DATA"),