Changeset e9f6979 in sasview for sansguiframe/src
- Timestamp:
- Dec 23, 2011 10:05:36 AM (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:
- 27f1ddb
- Parents:
- 1eae432
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansguiframe/src/sans/guiframe/gui_manager.py
r1eae432 re9f6979 42 42 from sans.dataloader.loader import Loader 43 43 44 from sans import sansview45 PATH_APP = os.path.dirname(sansview.__file__) 46 DATAPATH = PATH_APP 47 48 def _change_current_dir():44 # gui_manager should not know about sansview 45 #from sans import sansview 46 #PATH_APP = os.path.dirname(sansview.__file__) 47 48 def get_app_dir(): 49 49 """ 50 Get the path of the current file51 This is for openning sansview/data file fromcommand line50 Get the path of the current app (whatever among SansView/PrView/...) 51 This is mainly for running app/data file from the command line 52 52 """ 53 53 tem_path = sys.path[0] 54 54 if os.path.isfile(tem_path): 55 55 tem_path = os.path.dirname(tem_path) 56 57 os.chdir(os.path.abspath(tem_path)) 58 _change_current_dir() 56 return os.path.abspath(tem_path) 59 57 60 58 def get_user_directory(): … … 80 78 return config_module 81 79 80 # Get APP folder 81 PATH_APP = get_app_dir() 82 DATAPATH = PATH_APP 83 84 # GUI always starts from the App folder 85 os.chdir(PATH_APP) 82 86 # Read in the local config, which can either be with the main 83 87 # application or in the installation directory … … 292 296 self.Bind(EVT_NEW_COLOR, self.on_color_selection) 293 297 self.setup_custom_conf() 294 298 295 299 def add_icon(self): 296 300 """ … … 3032 3036 self.frame.Hide() 3033 3037 self.s_screen = None 3034 temp_path = None 3035 try: 3036 _change_current_dir() 3037 except: 3038 pass 3038 3039 3039 try: 3040 3040 self.open_file()
Note: See TracChangeset
for help on using the changeset viewer.