Did I find the right examples for you? yes no

All Samples(37)  |  Call(31)  |  Derive(0)  |  Import(6)
Return full path to the user-specific data 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_data_dir(appname=None, appauthor=None, version=None, roaming=False):
    r"""Return full path to the user-specific data 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.
        "roaming" (boolean, default False) can be set True to use the Windows
            roaming appdata directory. That means that for users on a Windows
            network setup for roaming profiles, this user data will be
            sync'd on login. See
            
            for a discussion of issues.

    Typical user data directories are:
        Mac OS X:               ~/Library/Application Support/
        Unix:                   ~/.local/share/    # or in $XDG_DATA_HOME, if defined
        Win XP (not roaming):   C:\Documents and Settings\\Application Data\\
        Win XP (roaming):       C:\Documents and Settings\\Local Settings\Application Data\\
        Win 7  (not roaming):   C:\Users\\AppData\Local\\
        Win 7  (roaming):       C:\Users\\AppData\Roaming\\

    For Unix, we follow the XDG spec and support $XDG_DATA_HOME.
    That means, by default "~/.local/share/".
    """
    if sys.platform == "win32":
        if appauthor is None:
            appauthor = appname
        const = roaming and "CSIDL_APPDATA" or "CSIDL_LOCAL_APPDATA"
        path = os.path.normpath(_get_win_folder(const))
        if appname:
            path = os.path.join(path, appauthor, appname)
    elif sys.platform == 'darwin':
        path = os.path.expanduser('~/Library/Application Support/')
        if appname:
            path = os.path.join(path, appname)
    else:
        path = os.getenv('XDG_DATA_HOME', os.path.expanduser("~/.local/share"))
        if appname:
            path = os.path.join(path, appname)
    if appname and version:
        path = os.path.join(path, version)
    return path
        


src/m/i/Mirror-MediaMonkey-to-Google-Music-HEAD/sync2gm/service.py   Mirror-MediaMonkey-to-Google-Music(Download)
def get_conf_dir(confname):
    """Return the directory for this *confname*, with a trailing separator."""
    conf_dir = appdirs.user_data_dir(appname='sync2gm', appauthor='Simon Weber', version=confname)
    conf_dir += os.sep    
 

src/c/o/counterpartyd_build-HEAD/setup.py   counterpartyd_build(Download)
def _get_app_cfg_paths(appname, run_as_user):
    import appdirs #installed earlier
    cfg_path = os.path.join(
        appdirs.user_data_dir(appauthor='Counterparty', appname=appname, roaming=True) \
            if os.name == "nt" else ("%s/.config/%s" % (os.path.expanduser("~%s" % run_as_user), appname)), 

src/b/o/BoottleXCP-HEAD/helpers.py   BoottleXCP(Download)
 
    if not data_dir:
        config.DATA_DIR = appdirs.user_data_dir(appauthor='Counterparty', appname='counterpartyd', roaming=True)
    else:
        config.DATA_DIR = data_dir

src/l/a/latitude_export-HEAD/latitude/config/settings.py   latitude_export(Download)
import ConfigParser
import os
from os.path import expanduser, join, exists, isdir
from appdirs import user_data_dir
from latitude import version as v
    def setup(self):
        # create datadir
        _datadir = user_data_dir(v.__name__,
                version=v.__version__, appauthor=v.__author__)
        _datadir = expanduser(_datadir)

src/u/s/usersettings-1.0.7/usersettings.py   usersettings(Download)
        """
        self.app_id = app_id
        self.settings_directory = appdirs.user_data_dir(app_id,
                                                        appauthor=app_id,
                                                        roaming=True)

src/u/s/usersettings-HEAD/usersettings.py   usersettings(Download)
        """
        self.app_id = app_id
        self.settings_directory = appdirs.user_data_dir(app_id,
                                                        appauthor=app_id,
                                                        roaming=True)

src/g/n/gnodeclient-0.3.2/gnodeclient/conf.py   gnodeclient(Download)
        # read config from file
        if file_name is None:
            file_name = os.path.join(appdirs.user_data_dir(appname=Configuration.NAME, appauthor=Configuration.ATHOR),
                                     Configuration.NAME + '.conf')
 
        self['cache_dir'] = options.get('cache_dir', appdirs.user_cache_dir(Configuration.NAME,
                                                                            appauthor=Configuration.ATHOR))
        self['log_dir'] = options.get('log_file', os.path.join(appdirs.user_data_dir(Configuration.NAME,
                                                                                     appauthor=Configuration.ATHOR),
                                                               Configuration.NAME + '.log'))

src/c/l/clans-0.1.0/clans/ui.py   clans(Download)
        self.profile_dir = profile_dir or (
            os.environ.get('CLANS_DIR', '')
            or appdirs.user_data_dir(appname='clans',
                                     appauthor='baldwint'))
 

src/s/o/Souma-0.2.1/web_ui/default_config.py   Souma(Download)
        return True
 
USER_DATA = appdirs.user_data_dir("souma", "souma", roaming=True)
 
#

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')
 

  1 | 2 | 3 | 4  Next