From 22f6ba3b6791695d476da301fbf8eb03ec5d3802 Mon Sep 17 00:00:00 2001 From: Mika Fischer Date: Tue, 7 Feb 2012 14:30:35 +0100 Subject: [PATCH] Try to ensure that sloth uses the corresponding module This also makes it possible to run sloth without installing or setting PYTHONPATH. --- sloth/bin/sloth | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sloth/bin/sloth b/sloth/bin/sloth index 5000459..2e9aab0 100755 --- a/sloth/bin/sloth +++ b/sloth/bin/sloth @@ -1,5 +1,7 @@ #!/usr/bin/env python -import sys +import os, sys +from os.path import dirname, realpath +sys.path.insert(1, dirname(dirname(dirname(realpath( __file__ ))))) from PyQt4.QtGui import QApplication from sloth.core.labeltool import LabelTool from sloth import APP_NAME, ORGANIZATION_NAME, ORGANIZATION_DOMAIN