Ignore:
Timestamp:
Oct 27, 2010 4:41:30 PM (14 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:
6cda91f
Parents:
c4d6900
Message:

working with pylint

File:
1 edited

Legend:

Unmodified
Added
Removed
  • calculatorview/perspectives/calculator/kiessig_calculator_panel.py

    r74b1770 rb0ab6cb  
    1111import wx 
    1212import sys 
    13 import os 
     13#import os 
    1414 
    15 from sans.guicomm.events import StatusEvent   
     15#from sans.guicomm.events import StatusEvent   
    1616from sans.calculator.kiessig_calculator import KiessigThicknessCalculator  
    17 from calculator_widgets import OutputTextCtrl, InputTextCtrl 
     17from calculator_widgets import OutputTextCtrl 
     18from calculator_widgets import InputTextCtrl 
    1819 
    1920_BOX_WIDTH = 77 
     
    3940    CENTER_PANE = True 
    4041     
    41     def __init__(self, parent, id=-1, *args, **kwds): 
    42         wx.Panel.__init__(self, parent, id=id, *args, **kwds) 
     42    def __init__(self, parent, *args, **kwds): 
     43        wx.Panel.__init__(self, parent, *args, **kwds) 
    4344        #Font size  
    4445        self.SetWindowVariant(variant=FONT_VARIANT)   
     
    4647        self.parent = parent 
    4748        self.kiessig = KiessigThicknessCalculator() 
     49        #layout attribute 
     50        self.hint_sizer = None 
    4851        self._do_layout() 
    4952        
     
    9194        """ 
    9295        thick_unit = '['+self.kiessig.get_thickness_unit() +']' 
    93         thickness_size_txt = wx.StaticText(self, -1, 'Thickness (or Diameter): ') 
     96        thickness_size_txt = wx.StaticText(self, -1,  
     97                                           'Thickness (or Diameter): ') 
    9498        self.thickness_size_tcl = OutputTextCtrl(self, -1,  
    9599                                                 size=(_BOX_WIDTH,-1)) 
     
    106110        Fill the sizer containing hint  
    107111        """ 
    108         hint_msg = "This tool is to approximately estimate the thickness of a layer" 
     112        hint_msg = "This tool is to approximately estimate " 
     113        hint_msg += "the thickness of a layer" 
    109114        hint_msg += " or the diameter of particles\n " 
    110115        hint_msg += "from the Kiessig fringe width in SANS/NR data." 
     
    148153        """ 
    149154        self.parent.Close() 
     155        if event is not None: 
     156            event.Skip() 
    150157         
    151158    def on_compute(self, event): 
     
    164171        self.thickness_size_tcl.SetValue(str(thickness)) 
    165172         
    166     def format_number(self,value=None): 
     173    def format_number(self, value=None): 
    167174        """ 
    168175        Return a float in a standardized, human-readable formatted string  
     
    174181            return output 
    175182 
    176         output= "%-7.4g" % value 
     183        output = "%-7.4g" % value 
    177184        return output.lstrip().rstrip()    
    178185      
    179186class KiessigWindow(wx.Frame): 
    180     def __init__(self, parent=None, id=1, title="Kiessig Thickness Calculator"): 
    181         wx.Frame.__init__(self, parent, id, title, size=(PANEL_WIDTH,PANEL_HEIGHT)) 
     187    def __init__(self, parent=None, title="Kiessig Thickness Calculator"): 
     188        wx.Frame.__init__(self, parent, title, 
     189                           size=(PANEL_WIDTH,PANEL_HEIGHT)) 
    182190        self.parent = parent 
    183191        self.panel = KiessigThicknessCalculatorPanel(parent=self) 
Note: See TracChangeset for help on using the changeset viewer.