borgend/locations.py

Sun, 28 Jan 2018 11:54:46 +0000

author
Tuomo Valkonen <tuomov@iki.fi>
date
Sun, 28 Jan 2018 11:54:46 +0000
changeset 80
a409242121d5
parent 79
locations.py@b075b3db3044
child 89
51cc2e25af38
permissions
-rw-r--r--

Better package-like organisation

#
# Locations
#

import os
import platform

from . import branding

if platform.system()!='Darwin':
    import xdg
    cfgfile=os.path.join(xdg.XDG_CONFIG_HOME, branding.appname, "config.yaml")
    logs_dir=os.path.join(xdg.XDG_DATA_HOME, branding.appname, "logs")
else:
    import rumps
    __base=rumps.application_support(branding.appname)
    cfgfile=os.path.join(__base, "config.yaml")
    logs_dir=os.path.join(__base, "logs")

mercurial