Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/TurtleArt
diff options
context:
space:
mode:
authorWalter Bender <walter@sugarlabs.org>2013-11-12 00:05:18 (GMT)
committer Walter Bender <walter@sugarlabs.org>2013-11-12 00:05:18 (GMT)
commitc5869c2857450fa2288530467c8e58bfa528f879 (patch)
tree6fc5cfe6859a196f50e5ebda43f03bc36722993c /TurtleArt
parent0d93925aa8f043fbefa0e46d7cab48deac30dda3 (diff)
look for TB in more places
Diffstat (limited to 'TurtleArt')
-rw-r--r--TurtleArt/taexportpython.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/TurtleArt/taexportpython.py b/TurtleArt/taexportpython.py
index 64b2aaf..819682e 100644
--- a/TurtleArt/taexportpython.py
+++ b/TurtleArt/taexportpython.py
@@ -39,9 +39,21 @@ from tawindow import plugins_in_use
_SETUP_CODE_START = """\
#!/usr/bin/env python
+_INSTALL_PATH = '/usr/share/sugar/activities/TurtleArt.activity'
+_ALTERNATIVE_INSTALL_PATH = \
+ '/usr/local/share/sugar/activities/TurtleArt.activity'
+
import os, sys
if os.path.exists('../TurtleBlocks.activity'):
sys.path.append('../TurtleBlocks.activity')
+elif os.path.exists(os.path.join(os.path.expanduser('~'), 'Activities',
+ 'TurtleBlocks.activity')):
+ sys.path.append(os.path.join(os.path.expanduser('~'), 'Activities',
+ 'TurtleBlocks.activity'))
+elif os.path.exists(_INSTALL_PATH):
+ sys.path.append(_INSTALL_PATH)
+elif os.path.exists(_ALTERNATIVE_INSTALL_PATH):
+ sys.path.append(_ALTERNATIVE_INSTALL_PATH)
else:
print 'This code require the TurtleBlocks activity to be installed.'
exit(1)