cwconfig.py
changeset 1023 278f997aa257
parent 1015 b5fdad9208f8
child 1039 95d3bfae7a9e
equal deleted inserted replaced
1022:15d3e1b3a27d 1023:278f997aa257
   351         return tuple(reversed(cubes))
   351         return tuple(reversed(cubes))
   352     
   352     
   353     @classmethod
   353     @classmethod
   354     def cls_adjust_sys_path(cls):
   354     def cls_adjust_sys_path(cls):
   355         """update python path if necessary"""
   355         """update python path if necessary"""
   356         if not cls.CUBES_DIR in sys.path:
   356         cubes_parent_dir = normpath(join(cls.CUBES_DIR, '..'))
   357             sys.path.insert(0, cls.CUBES_DIR)
   357         if not cubes_parent_dir in sys.path:
       
   358             sys.path.insert(0, cubes_parent_dir)
   358         try:
   359         try:
   359             import cubes
   360             import cubes
   360             cubes.__path__ = cls.cubes_search_path()
   361             cubes.__path__ = cls.cubes_search_path()
   361         except ImportError:
   362         except ImportError:
   362             return # cubes dir doesn't exists
   363             return # cubes dir doesn't exists