- Timestamp:
- Sep 8, 2008 5:16:37 PM (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:
- aa92772
- Parents:
- bee885e
- Location:
- sansview/perspectives
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/fitpanel.py
r060b857 r1c66bc5 90 90 self.fit_page_name = page_title 91 91 return panel 92 93 92 94 def add_model_page(self,model,page_title): 93 print "fitpanel: self.draw_model_name",self.draw_model_name 95 """ 96 Add a model page only one to display any model selected from the menu or the page combo box. 97 when this page is closed than the user will be able to open a new one 98 @param model: the model for which paramters will be changed 99 @param page_title: the name of the page 100 """ 94 101 if page_title !=self.draw_model_name or self.draw_model_name ==None: 95 print "went here"96 102 from modelpage import ModelPage 97 103 panel = ModelPage(self.nb,model, -1) … … 102 108 self.draw_model_name=page_title 103 109 else: 104 print "fitpanel: a page was added already "105 110 for i in range(self.nb.GetPageCount()): 106 111 if self.nb.GetPageText(i)==self.page_name: … … 110 115 111 116 112 113 117 def get_notebook(self): 114 118 """ -
sansview/perspectives/fitting/models.py
r060b857 r1c66bc5 4 4 5 5 (ModelEvent, EVT_MODEL) = wx.lib.newevent.NewEvent() 6 6 def _findModels(dir): 7 # List of plugin objects 8 plugins = [] 9 # Go through files in plug-in directory 10 try: 11 list = os.listdir(dir) 12 for item in list: 13 toks = os.path.splitext(os.path.basename(item)) 14 if toks[1]=='.py' and not toks[0]=='__init__': 15 name = toks[0] 16 17 path = [os.path.abspath(dir)] 18 file = None 19 try: 20 (file, path, info) = imp.find_module(name, path) 21 module = imp.load_module( name, file, item, info ) 22 if hasattr(module, "Model"): 23 try: 24 plugins.append(module.Model) 25 except: 26 log("Error accessing Model in %s\n %s" % (name, sys.exc_value)) 27 except: 28 pass 29 finally: 30 if not file==None: 31 file.close() 32 except: 33 pass 34 return plugins 7 35 8 36
Note: See TracChangeset
for help on using the changeset viewer.