Ignore:
Timestamp:
Jul 3, 2012 4:40:59 PM (12 years ago)
Author:
Jae Cho <jhjcho@…>
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:
8f59e95
Parents:
e0405592
Message:

changed label of taps and plot default title, and fixed loading text data

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sansguiframe/src/sans/guiframe/gui_manager.py

    r83b81b8 rd560a37  
    372372                                  details=details, 
    373373                                  file_name=file_name) 
    374         self.batch_frame.Show(True) 
     374        self.show_batch_frame(None) 
    375375         
    376376    def on_read_batch_tofile(self, event): 
     
    403403        fd = open(file_name, 'r') 
    404404        _, ext = os.path.splitext(file_name) 
    405         separator = "\t" 
     405        separator = None 
    406406        if ext.lower() == ".csv": 
    407407            separator = "," 
     
    414414        for index in range(len(lines)): 
    415415            line = lines[index] 
     416            line.strip() 
    416417            count = 0 
    417             if line.find(separator) != -1: 
     418            if separator == None: 
     419                line.replace('\t', ' ') 
     420                #found the first line containing the label 
     421                col_name_toks = line.split() 
     422                for item in col_name_toks: 
     423                    if item.strip() != "": 
     424                        count += 1 
     425                    else: 
     426                        line = " " 
     427            elif line.find(separator) != -1: 
    418428                if line.count(separator) >= 2: 
    419429                    #found the first line containing the label 
     
    430440        if column_names_line.strip() == "" or index is None: 
    431441            return  
     442 
    432443        col_name_toks = column_names_line.split(separator) 
    433444        c_index = 0 
     
    439450                c_index += 1 
    440451                 
    441        
    442452        self.open_with_localapp(data_outputs=data, data_inputs=None, 
    443453                                file_name=file_name, details=details) 
     
    13421352        id = wx.NewId() 
    13431353        hint = "Display batch results into a grid" 
    1344         self._view_menu.Append(id, '&Show Batch Results', hint)  
     1354        self._view_menu.Append(id, '&Show Grid Window', hint)  
    13451355        wx.EVT_MENU(self, id, self.show_batch_frame) 
    13461356 
Note: See TracChangeset for help on using the changeset viewer.