- Timestamp:
- Oct 9, 2013 10:42:24 AM (11 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- f2148b2
- Parents:
- aebd16a
- Location:
- src/sans/guiframe
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sans/guiframe/CategoryInstaller.py
r5777106 rb221176 49 49 returns the dir where default_cat.p should be 50 50 """ 51 import sans.sansview 51 52 cat_file = "default_categories.p" 52 app_dir = sys.path[0] 53 if os.path.isfile(app_dir): 54 app_dir = os.path.dirname(app_dir) 55 n_dir = 12 56 for i in range(n_dir): 57 path = os.path.join(app_dir, cat_file) 58 if os.path.isfile(path): 59 path = os.path.dirname(path) 60 return path 61 else: 62 app_dir, _ = os.path.split(app_dir) 63 64 raise RuntimeError('Could not find the App folder') 53 dir, file_name = os.path.split(sans.sansview.__file__) 54 cat_file_path = os.path.join(dir, cat_file) 55 if os.path.isfile(cat_file_path): 56 cat_file_dir = os.path.dirname(cat_file_path) 57 return cat_file_dir 58 59 raise RuntimeError('CategoryInstaller: Could not find folder containing default categories') 65 60 66 61 @staticmethod -
src/sans/guiframe/gui_manager.py
r5777106 rb221176 94 94 config_module = imp.load_module(file, fObj, path_config, descr) 95 95 except: 96 pass96 logging.error("Error loading %s/%s: %s" % (path, file, sys.exc_value)) 97 97 finally: 98 98 if fObj is not None: 99 99 fObj.close() 100 logging.info("GuiManager loaded %s/%s" % (path, file)) 100 101 return config_module 101 102
Note: See TracChangeset
for help on using the changeset viewer.