- Timestamp:
- Sep 10, 2008 9:45:04 AM (16 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:
- b30f001
- Parents:
- 1c66bc5
- Location:
- sansview
- Files:
-
- 1 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/models.py
r1c66bc5 raa92772 4 4 5 5 (ModelEvent, EVT_MODEL) = wx.lib.newevent.NewEvent() 6 def 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 6 22 def _findModels(dir): 7 23 # List of plugin objects … … 11 27 list = os.listdir(dir) 12 28 for item in list: 29 print "models: _findModels:",item 13 30 toks = os.path.splitext(os.path.basename(item)) 31 print "models: toks:",toks 14 32 if toks[1]=='.py' and not toks[0]=='__init__': 15 33 name = toks[0] … … 33 51 pass 34 52 return plugins 53 35 54 36 55 … … 89 108 modelmenu.Append(int(id_str), name, name) 90 109 wx.EVT_MENU(event_owner, int(id_str), self._on_model) 91 110 plugings=findModels() 111 print "models: plugings",plugings 92 112 return 0 93 113
Note: See TracChangeset
for help on using the changeset viewer.