Changeset e082e2c in sasview for DataLoader/readers


Ignore:
Timestamp:
Aug 1, 2009 8:40:21 AM (15 years ago)
Author:
Mathieu Doucet <doucetm@…>
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:
cb0d17c
Parents:
9ff861b
Message:

dataloader: allow all file extensions to be read by the ascii reader.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • DataLoader/readers/ascii_reader.py

    r0e5e586 re082e2c  
    3333    ## List of allowed extensions 
    3434    ext=['.txt', '.TXT', '.dat', '.DAT', '.abs', '.ABS']   
     35     
     36    ## Flag to bypass extension check 
     37    allow_all = True 
    3538     
    3639    def read(self, path): 
     
    4649            basename  = os.path.basename(path) 
    4750            root, extension = os.path.splitext(basename) 
    48             if extension.lower() in self.ext: 
     51            if self.allow_all or extension.lower() in self.ext: 
    4952                try: 
    5053                    input_f =  open(path,'r') 
Note: See TracChangeset for help on using the changeset viewer.