From 6c5b32e1354e678d3a75798c2772718dfc466150 Mon Sep 17 00:00:00 2001 From: Walter Bender Date: Mon, 11 Nov 2013 21:18:42 +0000 Subject: use sys.path directly instead of relying on PATHONPATH --- (limited to 'TurtleArt/taexportpython.py') 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 * -- cgit v0.9.1