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-11 21:18:42 (GMT)
committer Walter Bender <walter@sugarlabs.org>2013-11-11 21:18:42 (GMT)
commit6c5b32e1354e678d3a75798c2772718dfc466150 (patch)
treedcf821ac274a63e41e1556926c072e1bffab8cca /TurtleArt
parentccc188bbd90dbf128c4e9239c05319fb1b31f54a (diff)
use sys.path directly instead of relying on PATHONPATH
Diffstat (limited to 'TurtleArt')
-rw-r--r--TurtleArt/taexportpython.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/TurtleArt/taexportpython.py b/TurtleArt/taexportpython.py
index 1ed1ac5..64b2aaf 100644
--- a/TurtleArt/taexportpython.py
+++ b/TurtleArt/taexportpython.py
@@ -39,6 +39,13 @@ from tawindow import plugins_in_use
_SETUP_CODE_START = """\
#!/usr/bin/env python
+import os, sys
+if os.path.exists('../TurtleBlocks.activity'):
+ sys.path.append('../TurtleBlocks.activity')
+else:
+ print 'This code require the TurtleBlocks activity to be installed.'
+ exit(1)
+
from time import *
from random import uniform
from math import *