Changeset 88e289c in sasview
- Timestamp:
- Apr 9, 2009 5:45:30 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:
- d508be9
- Parents:
- 9181512
- Location:
- DataLoader
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
DataLoader/loader.py
r07f8d9a r88e289c 33 33 # Default readers are defined in the readers sub-module 34 34 import readers 35 from readers import ascii_reader 35 36 36 37 class Registry(ExtensionRegistry): … … 61 62 self.find_plugins('plugins') 62 63 64 65 def load(self, path, format=None): 66 """ 67 Call the loader for the file type of path. 68 69 @param path: file path 70 @param format: explicit extension, to force the use of a particular reader 71 72 Defaults to the ascii (multi-column) reader 73 if no reader was registered for the file's 74 extension. 75 """ 76 try: 77 return super(Registry, self).load(path, format=format) 78 except: 79 # No reader was found. Default to the ascii reader. 80 ascii_loader = ascii_reader.Reader() 81 return ascii_loader.read(path) 63 82 64 83 def find_plugins(self, dir): -
DataLoader/readers/defaults.xml
r28caa03 r88e289c 4 4 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 5 5 > 6 <FileType extension='.abs' reader='abs_reader'/>7 <FileType extension='.abs' reader='ascii_reader'/>8 6 9 <FileType extension='.txt' reader='ascii_reader'/>10 <FileType extension='.dat' reader='ascii_reader'/>11 12 7 <FileType extension='.xml' reader='cansas_reader'/> 13 14 <FileType extension='.sans' reader='danse_reader'/>15 16 <FileType extension='.d1d' reader='hfir1d_reader'/>17 18 <FileType extension='.asc' reader='IgorReader'/>19 20 <FileType extension='.tif' reader='tiff_reader'/>21 <FileType extension='.tiff' reader='tiff_reader'/>22 8 23 9 </SansLoader>
Note: See TracChangeset
for help on using the changeset viewer.