Changeset 926ece5 in sasview for src/sas/sasgui/guiframe


Ignore:
Timestamp:
Sep 18, 2018 9:36:59 AM (6 years ago)
Author:
krzywon
Branches:
master, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, unittest-saveload
Children:
5218180
Parents:
f4e2f22
Message:

Py3 compatibility and code cleanup.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/guiframe/gui_manager.py

    rfeec1cb r926ece5  
    24252425                    "CanSAS 1D files (*.xml)|*.xml|"\ 
    24262426                     "NXcanSAS files (*.h5)|*.h5|" 
    2427         options = {0: ".txt", 
    2428                    1: ".xml", 
    2429                    2: ".h5"} 
     2427        options = [".txt", ".xml",".h5"] 
    24302428        dlg = wx.FileDialog(self, "Choose a file", 
    24312429                            self._default_save_location, 
     
    25302528            text += 'dY_min = %s:  dY_max = %s\n' % (min(data.dy), max(data.dy)) 
    25312529        text += '\nData Points:\n' 
    2532         text += "<index> \t<X> \t<Y> \t<dY> \t<dX" 
    2533         if data.dxl is not None and data.dxw is not None: 
    2534                 text += "l> \t<dxw" 
    2535         text += ">\n" 
     2530        text += "<index> \t<X> \t<Y> \t<dY> " 
     2531        text += "\t<dX>\n" if(data.dxl is not None and 
     2532                              data.dxw is not None) else "\t<dXl> \t<dXw>\n" 
    25362533        for index in range(len(data.x)): 
    25372534            if data.dy is not None and len(data.dy) > index: 
Note: See TracChangeset for help on using the changeset viewer.