From 0ac16aa7ae1fce2738a27461df832799b1b601af Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Thu, 10 Nov 2011 15:37:47 -0500 Subject: [PATCH] Temporary fix to hooke/driver/wtk.py now that data_logger is deprecated. --- hooke/driver/wtk.py | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/hooke/driver/wtk.py b/hooke/driver/wtk.py index baac147..7fbc822 100644 --- a/hooke/driver/wtk.py +++ b/hooke/driver/wtk.py @@ -49,17 +49,6 @@ from .. import curve as curve from ..config import Setting from . import Driver as Driver -try: - import calibcant.config - calibcant_dir = calibcant.config.LOG_DIR -except ImportError: - calibcant_dir = None - -try: - import data_logger -except ImportError: - data_logger = None - class WTKDriver (Driver): """Handle W. Trevor King's data_logger data format. @@ -72,7 +61,7 @@ class WTKDriver (Driver): Setting(section=self.setting_section, help=self.__doc__), Setting(section=self.setting_section, option='cantilever calibration directory', - value=calibcant_dir, type='path', + value='~/rsrch/data/calibrate_cantilever', type='path', help='Set the directory where cantilever calibration data is stored'), ] @@ -218,7 +207,8 @@ class WTKDriver (Driver): if basedir == None: basedir = self.config['cantilever calibration directory'] YYYYMMDD = time.strftime("%Y%m%d", time.localtime(timestamp)) - dir = os.path.join(data_logger.normalize_log_dir(basedir), YYYYMMDD) + basedir = os.path.expanduser(basedir) + dir = os.path.join(basedir, YYYYMMDD) if not os.path.exists(dir): return [] all_calibfiles = os.listdir(dir) # everything in the directory -- 2.26.2