Changeset c151afc in sasview for sansguiframe/src/sans/guiframe/local_perspectives
- Timestamp:
- Apr 20, 2012 10:01:17 AM (13 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:
- 41a8cb3
- Parents:
- 9ccb7e1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansguiframe/src/sans/guiframe/local_perspectives/data_loader/data_loader.py
r70ecd530 rc151afc 178 178 output = {} 179 179 error_message = "" 180 info = "info" 180 181 for p_file in path: 181 182 basename = os.path.basename(p_file) … … 200 201 output[data.id] = data 201 202 message = "Loading Data..." + str(p_file) + "\n" 202 self.load_update(output=output, message=message )203 self.load_update(output=output, message=message, info=info) 203 204 except: 204 205 error = "Error while loading Data: %s\n" % str(p_file) … … 209 210 error_message += "When contacting the DANSE team, mention the" 210 211 error_message += " following:\n%s" % str(error) 211 self.load_update(output=output, message=error_message) 212 info = "error" 213 self.load_update(output=output, message=error_message, 214 info=info) 212 215 213 216 message = "Loading Data Complete! " 214 217 message += log_msg 218 if error_message!= "": 219 info = 'error' 215 220 self.load_complete(output=output, error_message=error_message, 216 message=message, path=path )221 message=message, path=path, info=info) 217 222 218 def load_update(self, output=None, message="" ):223 def load_update(self, output=None, message="", info="warning"): 219 224 """ 220 225 print update on the status bar 221 226 """ 222 227 if message != "": 223 wx.PostEvent(self.parent, StatusEvent(status=message, 224 type="progress" ,225 info="warning"))226 def load_complete(self, output, message="", error_message="", path=None):228 wx.PostEvent(self.parent, StatusEvent(status=message, info=info, 229 type="progress")) 230 def load_complete(self, output, message="", error_message="", path=None, 231 info="warning"): 227 232 """ 228 233 post message to status bar and return list of data 229 234 """ 230 wx.PostEvent(self.parent, StatusEvent(status=message, 231 info= "warning",235 wx.PostEvent(self.parent, StatusEvent(status=message, 236 info=info, 232 237 type="stop")) 233 238 if error_message != "":
Note: See TracChangeset
for help on using the changeset viewer.