Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugar/env.py
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <mpg@redhat.com>2006-05-23 02:14:22 (GMT)
committer Marco Pesenti Gritti <mpg@redhat.com>2006-05-23 02:14:22 (GMT)
commita32007ec7a87726f5ab780745382a47b07c40997 (patch)
tree9521a10dccc20b65d7253c7b50eb67985c80dfa2 /sugar/env.py
parentd213eada769f337bf0f538b1d670c0ab97caec54 (diff)
Add two env vars to set nick name and user dir
Diffstat (limited to 'sugar/env.py')
-rw-r--r--sugar/env.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/sugar/env.py b/sugar/env.py
index ffea539..82e47b1 100644
--- a/sugar/env.py
+++ b/sugar/env.py
@@ -6,7 +6,16 @@ except ImportError:
from sugar.__installed__ import *
def get_user_dir():
- return os.path.expanduser('~/.sugar/')
+ if os.environ.has_key('SUGAR_USER_DIR'):
+ return os.environ['SUGAR_USER_DIR']
+ else:
+ return os.path.expanduser('~/.sugar/')
+
+def get_nick_name():
+ if os.environ.has_key('SUGAR_NICK_NAME'):
+ return os.environ['SUGAR_NICK_NAME']
+ else:
+ return None
def get_data_file(filename):
for data_dir in get_data_dirs():