Changeset d560a37 in sasview for sansguiframe/src/sans/guiframe/gui_manager.py
- Timestamp:
- Jul 3, 2012 4:40:59 PM (12 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:
- 8f59e95
- Parents:
- e0405592
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansguiframe/src/sans/guiframe/gui_manager.py
r83b81b8 rd560a37 372 372 details=details, 373 373 file_name=file_name) 374 self. batch_frame.Show(True)374 self.show_batch_frame(None) 375 375 376 376 def on_read_batch_tofile(self, event): … … 403 403 fd = open(file_name, 'r') 404 404 _, ext = os.path.splitext(file_name) 405 separator = "\t"405 separator = None 406 406 if ext.lower() == ".csv": 407 407 separator = "," … … 414 414 for index in range(len(lines)): 415 415 line = lines[index] 416 line.strip() 416 417 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: 418 428 if line.count(separator) >= 2: 419 429 #found the first line containing the label … … 430 440 if column_names_line.strip() == "" or index is None: 431 441 return 442 432 443 col_name_toks = column_names_line.split(separator) 433 444 c_index = 0 … … 439 450 c_index += 1 440 451 441 442 452 self.open_with_localapp(data_outputs=data, data_inputs=None, 443 453 file_name=file_name, details=details) … … 1342 1352 id = wx.NewId() 1343 1353 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) 1345 1355 wx.EVT_MENU(self, id, self.show_batch_frame) 1346 1356
Note: See TracChangeset
for help on using the changeset viewer.