Changeset 33afff7 in sasview
- Timestamp:
- Feb 21, 2009 8:42:25 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:
- 353041d
- Parents:
- 858f2ae5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/models.py
rf39511b r33afff7 1 #TODO: add comments to document this module 2 #TODO: clean-up the exception handling. 3 #TODO: clean-up existing comments/documentation. 4 # For example, the _getModelList method advertises 5 # an 'id' parameter that is not part of the method's signature. 6 # It also advertises an ID as return value but it always returns zero. 7 #TODO: clean-up the FractalAbsModel and PowerLawAbsModel menu items. Those 8 # model definitions do not belong here. They belong with the rest of the 9 # models. 10 1 11 import wx 2 12 import imp … … 6 16 (ModelEvent, EVT_MODEL) = wx.lib.newevent.NewEvent() 7 17 8 9 18 # Time is needed by the log method 19 import time 20 21 # Explicitly import from the pluginmodel module so that py2exe 22 # places it in the distribution. The Model1DPlugin class is used 23 # as the base class of plug-in models. 24 from sans.models.pluginmodel import Model1DPlugin 10 25 11 26 def log(message): 12 print message13 27 out = open("plugins.log", 'a') 14 28 out.write("%10g: %s\n" % (time.clock(), message)) … … 16 30 17 31 def findModels(): 18 print "looking for models"32 log("looking for models in: %s/plugins" % os.getcwd()) 19 33 if os.path.isdir('plugins'): 20 34 return _findModels('plugins') … … 49 63 file.close() 50 64 except: 65 # Don't deal with bad plug-in imports. Just skip. 51 66 pass 52 67 return plugins
Note: See TracChangeset
for help on using the changeset viewer.