Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/IKnowMyABCs.py
diff options
context:
space:
mode:
authorWalter Bender <walter.bender@gmail.com>2013-02-01 23:44:57 (GMT)
committer Walter Bender <walter.bender@gmail.com>2013-02-01 23:44:57 (GMT)
commitffda647870496e7ec58f72029dc4e5c37e416b10 (patch)
tree7df2582853e0c6e219e1822a220829401f62cb2e /IKnowMyABCs.py
parentf59b2031db0dde0291377243604551278024dd16 (diff)
updates from .NI feedback
Diffstat (limited to 'IKnowMyABCs.py')
-rw-r--r--IKnowMyABCs.py19
1 files changed, 12 insertions, 7 deletions
diff --git a/IKnowMyABCs.py b/IKnowMyABCs.py
index 32a517f..bd27c97 100644
--- a/IKnowMyABCs.py
+++ b/IKnowMyABCs.py
@@ -65,16 +65,21 @@ class IKnowMyABCs(activity.Activity):
# FIXME: find some reasonable default situation
language = 'es'
- if os.path.exists(os.path.join('~', 'Activities',
+ home_path = os.path.expanduser('~')
+ if os.path.exists(os.path.join(home_path, 'Activities',
'IKnowMyABCs.activity')):
- self._lessons_path = os.path.join('~', 'Activities',
- 'IKnowMyABCs.activity',
- 'lessons', language)
+ self.activity_path = os.path.join(home_path, 'Activities',
+ 'IKnowMyABCs.activity')
else:
- self._lessons_path = os.path.join('.', 'lessons', language)
+ self.activity_path = os.path.abspath('.')
+
+ self._lessons_path = os.path.join(self.activity_path,
+ 'lessons', language)
+ self._images_path = os.path.join(self.activity_path,
+ 'images', language)
+ self._sounds_path = os.path.join(self.activity_path,
+ 'sounds', language)
- self._images_path = self._lessons_path.replace('lessons', 'images')
- self._sounds_path = self._lessons_path.replace('lessons', 'sounds')
self._setup_toolbars()
# Create a canvas