Commit 09049e8d authored by Peter Jansweijer's avatar Peter Jansweijer

library path now relative with respect to __file__ (not relative to curretn working directory)

parent 9eab9b59
......@@ -34,6 +34,7 @@ Options:
"""
import os
import sys
import vxi11
import scipy
......@@ -41,7 +42,9 @@ import numpy
import matplotlib.pyplot as plt
# Add parent directory (containing 'lib') to the module search path
sys.path.insert(0,'..')
lib_path = (os.path.dirname(os.path.abspath(__file__)))
lib_path = os.path.join(lib_path,"..")
sys.path.insert(0,lib_path)
# private imports:
from lib.docopt import docopt
......
......@@ -66,6 +66,7 @@ Options:
-m,--meas=<i> : <int> number of measurements to be taken [default: 1]
"""
import os
import sys
import vxi11
import scipy
......@@ -73,7 +74,9 @@ import numpy
import matplotlib.pyplot as plt
# Add parent directory (containing 'lib') to the module search path
sys.path.insert(0,'..')
lib_path = (os.path.dirname(os.path.abspath(__file__)))
lib_path = os.path.join(lib_path,"..")
sys.path.insert(0,lib_path)
# private imports:
from lib.docopt import docopt
......
......@@ -53,6 +53,7 @@ Options:
--version Show version.
"""
import os
import sys
import time
import struct
......@@ -65,7 +66,9 @@ import numpy
import matplotlib.pyplot as plt
# Add parent directory (containing 'lib') to the module search path
sys.path.insert(0,'..')
lib_path = (os.path.dirname(os.path.abspath(__file__)))
lib_path = os.path.join(lib_path,"..")
sys.path.insert(0,lib_path)
# private imports:
from lib.docopt import docopt
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment