Changeset 85a24d9 in sasview for calculatorview/perspectives/calculator
- Timestamp:
- Apr 22, 2010 11:00:36 AM (15 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:
- 2b0443f
- Parents:
- e56869f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
calculatorview/perspectives/calculator/__init__.py
r698a734 r85a24d9 12 12 if os.path.isdir(path): 13 13 return path 14 15 14 # Check for data path next to exe/zip file. 16 15 # If we are inside a py2exe zip file, we need to go up … … 18 17 # We will check if the exe and the xsf are in the same 19 18 # directory. 20 path= os.path.dirname(__file__) 21 n_dir = 4 19 path = os.path.dirname(__file__) 20 #Look for maximum n_dir up of the current dir to find media 21 n_dir = 12 22 22 for i in range(n_dir): 23 path, _ = os.path.split(path)24 25 path = os.path.join(path, '', media,'calculator_media' )26 if os.path.isdir(path):27 return path28 path = os.path.join(path, '', media)29 if os.path.isdir(path):30 return path23 path, _ = os.path.split(path) 24 media_path = os.path.join(path, media) 25 if os.path.isdir(media_path): 26 module_media_path = os.path.join(media_path,'calculator_media') 27 if os.path.isdir(module_media_path): 28 return module_media_path 29 return media_path 30 31 31 raise RuntimeError('Could not find calculator media files') 32 32
Note: See TracChangeset
for help on using the changeset viewer.