Changeset dad7cef in sasview
- Timestamp:
- Sep 21, 2012 11:31:54 AM (12 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:
- 944724a
- Parents:
- 2bb625f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansguiframe/src/sans/guiframe/CategoryInstaller.py
r4f973f3 rdad7cef 6 6 7 7 @author kieranrcampbell@gmail.com 8 @modified by NIST/MD sa nview team8 @modified by NIST/MD sasview team 9 9 """ 10 10 … … 43 43 import sans.perspectives.fitting.models 44 44 return sans.perspectives.fitting.models.get_model_python_path() 45 45 46 @staticmethod 46 47 def _get_default_cat_p_dir(): … … 48 49 returns the dir where default_cat.p should be 49 50 """ 50 app_path = sys.path[0] 51 if os.path.isfile(app_path): 52 app_path = os.path.dirname(app_path) 53 return app_path 51 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') 54 65 55 66 @staticmethod
Note: See TracChangeset
for help on using the changeset viewer.