diff --git a/Makefile b/Makefile index 0c2f216..31c5db7 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ TEMP_PATH:=$(shell echo ~/work/lipase/tmp) TESTS_OUTPUT_DATA_PATH:=$(TEMP_PATH) LIB_SRC_FILES=$(shell find ./src/lipase -name "*.py") PLUGINS_SRC_FILES=$(shell find ./src/ij-plugins -name "*.py") -LIPASE_VERSION=1.05 +LIPASE_VERSION=1.06 BUILD_ROOT_PATH:=$(TEMP_PATH)/build PACKAGE_FILE_PATH=$(BUILD_ROOT_PATH)/lipase-$(LIPASE_VERSION).zip diff --git a/src/ij-plugins/Ipr/Lipase/Define_Raw_Images_Root.py b/src/ij-plugins/Ipr/Lipase/Define_Raw_Images_Root.py index f6322d6..fdf88c1 100644 --- a/src/ij-plugins/Ipr/Lipase/Define_Raw_Images_Root.py +++ b/src/ij-plugins/Ipr/Lipase/Define_Raw_Images_Root.py @@ -19,7 +19,7 @@ from lipase.settings import UserSettings def run_script(): settings = UserSettings() - settings.raw_images_root_path = str(RAW_IMAGES_ROOT_PATH) + settings.raw_images_root_path = unicode(RAW_IMAGES_ROOT_PATH) settings.save() # global INFO # INFO = "the root directory containing raw images (%s) has been stored in your settings file %s" % (str(RAW_IMAGES_ROOT_PATH), settings.get_settings_file_path()) diff --git a/src/lipase/settings.py b/src/lipase/settings.py index 841335c..a964a02 100644 --- a/src/lipase/settings.py +++ b/src/lipase/settings.py @@ -3,26 +3,27 @@ import json #from os.path import expanduser #import os.path import os +from . import logger class UserSettings(object): """User settings.""" - attributes = {'raw_images_root_path': {'type': str}} + attributes = {'raw_images_root_path': {'type': unicode}} def __init__(self): """constructor.""" self.settings = {} # json dictionary - self.raw_images_root_path = 'bla' + self.raw_images_root_path = u'bla' try: with open(self.get_settings_file_path(), 'r') as json_file: self.settings = json.load(json_file) except IOError as error: - print('Failed to read %s : %s' % (self.get_settings_file_path(), error)) + logger.error('Failed to read %s : %s' % (self.get_settings_file_path(), error)) def __getattr__(self, attr): """Override __getattr__ to check the validity of settings attributes names.""" - print('getting %s' % (attr,)) + logger.debug('getting %s' % (attr,)) if attr == 'settings': return self.__dict__['settings'] else: @@ -31,7 +32,7 @@ class UserSettings(object): def __setattr__(self, attr, value): """Override __setattr__ to check the validity of settings attributes names.""" - print('setting %s to %s' % (attr, value)) + logger.debug('setting %s to %s' % (attr, value)) if attr == 'settings': self.__dict__['settings'] = value else: