Changeset 1ed9c57 in sasview
- Timestamp:
- Sep 14, 2008 9:13:26 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:
- c7bc3e7
- Parents:
- fa5908de
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
DataLoader/loader.py
r84545dd r1ed9c57 32 32 ## Writers 33 33 self.writers = {} 34 35 ## List of wildcards 36 self.wildcards = ['All (*.*)|*.*'] 34 37 35 38 ## Creation time, for testing … … 68 71 readers_found += 1 69 72 except : 70 logging.error("Loader: Error importing %s\n %s" % ( name, sys.exc_value))73 logging.error("Loader: Error importing %s\n %s" % (item, sys.exc_value)) 71 74 72 75 # Process zip files … … 112 115 self.loaders[ext].insert(0,loader.read) 113 116 reader_found = True 114 117 118 # Keep track of wildcards 119 for wcard in loader.type: 120 if wcard not in self.wildcards: 121 self.wildcards.append(wcard) 122 115 123 # Check whether writing is supported 116 124 if hasattr(loader, 'write'): … … 210 218 return self.__registry.find_plugins(dir) 211 219 220 def get_wildcards(self): 221 return self.__registry.wildcards 212 222 213 223 if __name__ == "__main__": … … 218 228 l = Loader() 219 229 data = l.load('test/cansas1d.xml') 220 l.save('test_file.xml', data) 221 222 223 230 l.save('test_file.xml', data, '.xml') 231 232 print l.get_wildcards() 233 234 235
Note: See TracChangeset
for help on using the changeset viewer.