summaryrefslogtreecommitdiff
path: root/silx/gui/utils/glutils.py
diff options
context:
space:
mode:
Diffstat (limited to 'silx/gui/utils/glutils.py')
-rw-r--r--silx/gui/utils/glutils.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/silx/gui/utils/glutils.py b/silx/gui/utils/glutils.py
index fca9a32..83cfd89 100644
--- a/silx/gui/utils/glutils.py
+++ b/silx/gui/utils/glutils.py
@@ -27,6 +27,13 @@
import os
import sys
+
+if __name__ == "__main__":
+ # When run as a script, remove directory from sys.path
+ # This avoids other script in same directory to override Python modules
+ if os.path.abspath(sys.path[0]) == os.path.abspath(os.path.dirname(__file__)):
+ sys.path.pop(0)
+
import subprocess
from silx.gui import qt