Changeset cb0d17c in sasview
- Timestamp:
- Aug 1, 2009 10:20:08 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:
- d7412e0
- Parents:
- e082e2c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
guiframe/data_loader.py
rd4ccbb1 rcb0d17c 71 71 return None, None, None, None 72 72 73 def load_error(error=None): 74 """ 75 Pop up an error message. 76 77 @param error: details error message to be displayed 78 """ 79 message = "You had to try this, didn't you?\n\n" 80 message += "The data file you selected could not be loaded.\n" 81 message += "Make sure the content of your file is properly formatted.\n\n" 82 83 if error is not None: 84 message += "When contacting the DANSE team, mention the following:\n%s" % str(error) 85 86 dial = wx.MessageDialog(None, message, 'Error Loading File', wx.OK | wx.ICON_EXCLAMATION) 87 dial.ShowModal() 88 73 89 def plot_data(parent, path): 74 90 """ … … 79 95 from DataLoader.loader import Loader 80 96 81 # Instantiate a loader97 # Instantiate a loader 82 98 L = Loader() 83 99 84 # Recievesdata100 # Load data 85 101 try: 86 102 output=L.load(path) 87 if output==None:88 msg="Could not open this page"89 wx.PostEvent(parent, StatusEvent(status=msg))90 return91 103 except: 92 wx.PostEvent(parent, StatusEvent(status="Problem loading file: %s" % sys.exc_value))104 load_error(sys.exc_value) 93 105 return 94 106 107 # Notify user if the loader completed the load but no data came out 108 if output == None: 109 load_error("The data file appears to be empty.") 110 return 95 111 96 112 filename = os.path.basename(path)
Note: See TracChangeset
for help on using the changeset viewer.