Changeset cda697a in sasview
- Timestamp:
- Jan 11, 2012 1:04:29 PM (13 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:
- aa07420
- Parents:
- 9520702
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansguiframe/src/sans/guiframe/gui_manager.py
r176fbf1 rcda697a 48 48 def get_app_dir(): 49 49 """ 50 Get the path of the current app (whatever among SansView/PrView/...) 51 This is mainly for running app/data file from the command line 50 Return sansview dir until we clean up the gui_manager configuration. 51 There should be a proper config class so that we don't need all 52 the complexity currently used to figure out where things are. 52 53 """ 53 tem_path = sys.path[0] 54 if os.path.isfile(tem_path): 55 tem_path = os.path.dirname(tem_path) 56 return os.path.abspath(tem_path) 54 from sans import sansview 55 return os.path.dirname(sansview.__file__) 57 56 58 57 def get_user_directory(): … … 83 82 84 83 # GUI always starts from the App folder 85 os.chdir(PATH_APP)84 #os.chdir(PATH_APP) 86 85 # Read in the local config, which can either be with the main 87 86 # application or in the installation directory … … 89 88 if config is None: 90 89 config = _find_local_config('local_config', os.getcwd()) 91 if config is None: 92 # Didn't find local config, load the default 93 import sans.guiframe.config as config 94 90 if config is None: 91 # Didn't find local config, load the default 92 import sans.guiframe.config as config 93 logging.info("using default local_config") 94 else: 95 logging.info("found local_config in %s" % os.getcwd()) 96 else: 97 logging.info("found local_config in %s" % PATH_APP) 98 95 99 from sans.guiframe.customdir import SetupCustom 96 100 c_conf_dir = SetupCustom().setup_dir(PATH_APP) … … 98 102 if custom_config is None: 99 103 custom_config = _find_local_config('custom_config', os.getcwd()) 100 if custom_config is None: 101 msg = "Custom_config file was not imported" 102 logging.info(msg) 103 104 if custom_config is None: 105 msg = "Custom_config file was not imported" 106 logging.info(msg) 107 else: 108 logging.info("using custom_config in %s" % os.getcwd()) 109 else: 110 logging.info("using custom_config from %s" % c_conf_dir) 104 111 105 112 #read some constants from config
Note: See TracChangeset
for help on using the changeset viewer.