Changeset 8d6440f in sasview for DataLoader/plugins


Ignore:
Timestamp:
Jul 9, 2008 6:05:49 PM (16 years ago)
Author:
Gervaise Alina <gervyh@…>
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:
c45976b
Parents:
8dac49d
Message:

readers printing in a log file text_log.txt now.testload modified

Location:
DataLoader/plugins
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • DataLoader/plugins/TXT2_Reader.py

    r1b0b3ca r8d6440f  
    22import wx 
    33import string,numpy 
     4import logging 
    45class Reader: 
    56    """ 
     
    2728                return None 
    2829            else: 
    29                 input_f =  open(path,'r') 
     30                try: 
     31                    input_f =  open(path,'r') 
     32                except : 
     33                    raise  RuntimeError,"TXT2_Reader cannot open %s"%(path) 
    3034                buff = input_f.read() 
    3135                lines = buff.split('\n') 
     
    6367                    #msg="R1 reading: \n"+"this x :"+ str(self.x) +"\n"+"this y:"+str(self.y)+"\n"+"this dy :"+str(self.dy)+"\n" 
    6468                    #return msg 
    65                     print "TXT2_Reader reading  %s\n" %path 
     69                    logging.info("TXT2_Reader reading  %s\n" %path) 
    6670                    return self.x,self.y,self.dy 
    6771        return None 
  • DataLoader/plugins/TXT3_Reader.py

    r1b0b3ca r8d6440f  
    22import wx 
    33import string,numpy 
     4import logging 
    45class Reader: 
    56    """ 
     
    3132                return None 
    3233            else: 
    33                 input_f =  open(path,'r') 
     34                try: 
     35                    input_f =  open(path,'r') 
     36                except : 
     37                    raise  RuntimeError,"TXT3_Reader cannot open %s"%(path) 
    3438                buff = input_f.read() 
    3539                lines = buff.split('\n') 
     
    6569                    #msg="txtReader  Reading:\n"+"this x :"+ str(self.x) +"\n"+"this y:"+str(self.y)+"\n"+"this dy :"+str(self.dy)+"\n" 
    6670                    #return msg 
    67                     print "TXT3_Reader reading %s \n" %path 
     71                    logging.info ("TXT3_Reader reading %s \n" %(path)) 
    6872                    return self.x,self.y,self.dy 
    6973                 
Note: See TracChangeset for help on using the changeset viewer.