locations.py

changeset 79
b075b3db3044
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locations.py	Sun Jan 28 11:38:01 2018 +0000
@@ -0,0 +1,17 @@
+#
+# Locations
+#
+
+import os
+import platform
+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