Changeset aa92772 in sasview


Ignore:
Timestamp:
Sep 10, 2008 9:45:04 AM (16 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:
b30f001
Parents:
1c66bc5
Message:

moving plugins folder

Location:
sansview
Files:
1 edited
1 moved

Legend:

Unmodified
Added
Removed
  • sansview/perspectives/fitting/models.py

    r1c66bc5 raa92772  
    44 
    55(ModelEvent, EVT_MODEL) = wx.lib.newevent.NewEvent() 
     6def findModels(): 
     7    print "looking for models" 
     8    try: 
     9        cwd= os.path.split(__file__)[0] 
     10    except: 
     11        cwd= os.getcwd() 
     12    print "models cwd",cwd 
     13    dir=os.path.join(cwd,'plugins') 
     14    print "models: find plugins",dir 
     15    if os.path.isdir(dir): 
     16        return _findModels(dir) 
     17    else: 
     18        return [] 
     19     
     20     
     21     
    622def _findModels(dir): 
    723    # List of plugin objects 
     
    1127        list = os.listdir(dir) 
    1228        for item in list: 
     29            print "models: _findModels:",item 
    1330            toks = os.path.splitext(os.path.basename(item)) 
     31            print "models: toks:",toks 
    1432            if toks[1]=='.py' and not toks[0]=='__init__': 
    1533                name = toks[0] 
     
    3351        pass 
    3452    return plugins 
     53     
    3554 
    3655 
     
    89108            modelmenu.Append(int(id_str), name, name) 
    90109            wx.EVT_MENU(event_owner, int(id_str), self._on_model)        
    91      
     110        plugings=findModels() 
     111        print "models: plugings",plugings 
    92112        return 0 
    93113     
Note: See TracChangeset for help on using the changeset viewer.