Changeset e56869f in sasview


Ignore:
Timestamp:
Apr 22, 2010 10:43:53 AM (15 years ago)
Author:
Gervaise Alina <gervyh@…>
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:
85a24d9
Parents:
1c271f2
Message:

working on the bundle of mac

File:
1 edited

Legend:

Unmodified
Added
Removed
  • invariantview/perspectives/invariant/__init__.py

    r698a734 re56869f  
    1515    # Check for data path next to exe/zip file. 
    1616    # If we are inside a py2exe zip file, we need to go up 
    17     # two levels to get to the directory containing the exe 
    18     # We will check if the exe and the xsf are in the same 
    19     # directory. 
    20     path= os.path.dirname(__file__) 
    21     n_dir = 4 
     17    # to get to the directory containing  
     18    # the media for thsi module 
     19    path = os.path.dirname(__file__) 
     20    n_dir = 12 
    2221    for i in range(n_dir): 
    23         path,_ = os.path.split(path) 
    24  
    25     path = os.path.join(path, '', media,'invariant_media' ) 
    26     if os.path.isdir(path): 
    27         return path 
    28     path = os.path.join(path, '', media) 
    29     if os.path.isdir(path): 
    30         return path 
     22        path, _ = os.path.split(path) 
     23        media_path = os.path.join(path, media) 
     24        if os.path.isdir(media_path): 
     25             module_media_path = os.path.join(media_path,'invariant_media' ) 
     26             if os.path.isdir(module_media_path): 
     27                 return module_media_path 
     28             return media_path 
     29    
    3130    raise RuntimeError('Could not find invariant media files') 
    3231 
Note: See TracChangeset for help on using the changeset viewer.