diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2014-09-12 17:37:09 +0200 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2014-09-16 19:16:33 +0200 |
| commit | bc60d52846ba11369f73a80a394345b47caea876 (patch) | |
| tree | 66bb9b506e5238c8692dcc345e07381dde527e7a /client | |
| parent | 1c802f6ee791b9b18fbc3ad2791e94e083af3fde (diff) | |
| download | jasper-client-bc60d52846ba11369f73a80a394345b47caea876.tar.gz jasper-client-bc60d52846ba11369f73a80a394345b47caea876.zip | |
Added `jasperpath` module
Diffstat (limited to 'client')
| -rw-r--r-- | client/jasperpath.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/client/jasperpath.py b/client/jasperpath.py new file mode 100644 index 0000000..b8865cf --- /dev/null +++ b/client/jasperpath.py @@ -0,0 +1,18 @@ +#!/usr/bin/env python2 +# -*- coding: utf-8-*- +import os + +# Jasper main directory +APP_PATH = os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), os.pardir)) + +DATA_PATH = os.path.join(APP_PATH, "static") +LIB_PATH = os.path.join(APP_PATH, "client") +PLUGIN_PATH = os.path.join(LIB_PATH, "modules") + +CONFIG_PATH = os.path.expanduser(os.getenv('JASPER_CONFIG', '~/.jasper')) + +def config(*fname): + return os.path.join(CONFIG_PATH, *fname) + +def data(*fname): + return os.path.join(DATA_PATH, *fname)
\ No newline at end of file |
