Ignore:
Timestamp:
Mar 4, 2015 1:28:39 PM (9 years ago)
Author:
Doucet, Mathieu <doucetm@…>
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:
2f732b0
Parents:
76aed53
Message:

Take care of white spaces (pylint)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/perspectives/calculator/data_operator.py

    rde69095 r49ab5d7  
    1111from sas.plottools import transform 
    1212from matplotlib.font_manager import FontProperties 
    13 from sas.guiframe.events import StatusEvent  
     13from sas.guiframe.events import StatusEvent 
    1414from sas.perspectives.calculator import calculator_widgets as widget 
    1515from sas.guiframe.documentation_window import DocumentationWindow 
    16     
     16 
    1717#Control panel width  
    1818if sys.platform.count("win32") > 0: 
     
    2828    FONT_VARIANT = 1 
    2929    ON_MAC = True 
    30        
     30 
    3131class DataOperPanel(wx.ScrolledWindow): 
    3232    """ 
     
    6262        self.fill_oprator_combox() 
    6363        self.Bind(wx.EVT_PAINT, self.set_panel_on_focus) 
    64               
     64 
    6565    def _define_structure(self): 
    6666        """ 
    67         define initial sizer  
     67        define initial sizer 
    6868        """ 
    6969        self.main_sizer = wx.BoxSizer(wx.VERTICAL) 
     
    7575        self.name_sizer = wx.StaticBoxSizer(name_box, wx.HORIZONTAL) 
    7676        self.button_sizer = wx.BoxSizer(wx.HORIZONTAL) 
    77        
     77 
    7878    def _layout_name(self): 
    7979        """ 
     
    8181        """ 
    8282        new_data_sizer = wx.BoxSizer(wx.VERTICAL) 
    83         equal_sizer =  wx.BoxSizer(wx.VERTICAL) 
     83        equal_sizer = wx.BoxSizer(wx.VERTICAL) 
    8484        old_data1_sizer = wx.BoxSizer(wx.VERTICAL) 
    8585        operator_sizer = wx.BoxSizer(wx.VERTICAL) 
    8686        old_data2_sizer = wx.BoxSizer(wx.VERTICAL) 
    8787        data2_hori_sizer = wx.BoxSizer(wx.HORIZONTAL) 
    88         data_name = wx.StaticText(self, -1, 'Output Data Name')   
    89         equal_name = wx.StaticText(self, -1, ' =', size=(50, 25))  
     88        data_name = wx.StaticText(self, -1, 'Output Data Name') 
     89        equal_name = wx.StaticText(self, -1, ' =', size=(50, 25)) 
    9090        data1_name = wx.StaticText(self, -1, 'Data1') 
    9191        operator_name = wx.StaticText(self, -1, 'Operator') 
    9292        data2_name = wx.StaticText(self, -1, 'Data2 (or Number)') 
    93         self.data_namectr = wx.TextCtrl(self, -1, size=(_BOX_WIDTH, 25), style=wx.TE_PROCESS_ENTER)  
     93        self.data_namectr = wx.TextCtrl(self, -1, size=(_BOX_WIDTH, 25), style=wx.TE_PROCESS_ENTER) 
    9494        self.data_namectr.SetToolTipString("Hit 'Enter' key after typing.") 
    9595        self.data_namectr.SetValue(str('MyNewDataName')) 
    96         self.numberctr = wx.TextCtrl(self, -1, size=(_BOX_WIDTH/3, 25), style=wx.TE_PROCESS_ENTER)  
     96        self.numberctr = wx.TextCtrl(self, -1, size=(_BOX_WIDTH / 3, 25), style=wx.TE_PROCESS_ENTER) 
    9797        self.numberctr.SetToolTipString("Hit 'Enter' key after typing.") 
    9898        self.numberctr.SetValue(str(1.0)) 
    99         self.data1_cbox = wx.ComboBox(self, -1, size=(_BOX_WIDTH, 25),  
     99        self.data1_cbox = wx.ComboBox(self, -1, size=(_BOX_WIDTH, 25), 
    100100                                      style=wx.CB_READONLY) 
    101         self.operator_cbox = wx.ComboBox(self, -1, size=(70, 25),  
     101        self.operator_cbox = wx.ComboBox(self, -1, size=(70, 25), 
    102102                                         style=wx.CB_READONLY) 
    103103        operation_tip = "Add: +, Subtract: -, " 
     
    105105        operation_tip += "Append(Combine): | " 
    106106        self.operator_cbox.SetToolTipString(operation_tip) 
    107         self.data2_cbox = wx.ComboBox(self, -1, size=(_BOX_WIDTH*2/3, 25), 
     107        self.data2_cbox = wx.ComboBox(self, -1, size=(_BOX_WIDTH * 2 / 3, 25), 
    108108                                       style=wx.CB_READONLY) 
    109109 
    110         self.out_pic = SmallPanel(self, -1, True,  
    111                                     size=(_BOX_WIDTH, _BOX_WIDTH),  
     110        self.out_pic = SmallPanel(self, -1, True, 
     111                                    size=(_BOX_WIDTH, _BOX_WIDTH), 
    112112                                    style=wx.NO_BORDER) 
    113         self.equal_pic = SmallPanel(self, -1, True, '=',   
    114                                     size=(50, _BOX_WIDTH),  
     113        self.equal_pic = SmallPanel(self, -1, True, '=', 
     114                                    size=(50, _BOX_WIDTH), 
    115115                                    style=wx.NO_BORDER) 
    116         self.data1_pic = SmallPanel(self, -1, True,  
    117                                     size=(_BOX_WIDTH, _BOX_WIDTH),  
     116        self.data1_pic = SmallPanel(self, -1, True, 
     117                                    size=(_BOX_WIDTH, _BOX_WIDTH), 
    118118                                    style=wx.NO_BORDER) 
    119119        self.operator_pic = SmallPanel(self, -1, True, '+', 
    120                                     size=(70, _BOX_WIDTH),  
     120                                    size=(70, _BOX_WIDTH), 
    121121                                    style=wx.NO_BORDER) 
    122         self.data2_pic = SmallPanel(self, -1, True,  
    123                                     size=(_BOX_WIDTH, _BOX_WIDTH),  
     122        self.data2_pic = SmallPanel(self, -1, True, 
     123                                    size=(_BOX_WIDTH, _BOX_WIDTH), 
    124124                                    style=wx.NO_BORDER) 
    125125        for ax in self.equal_pic.axes: 
     
    144144                                       (data2_hori_sizer, 0, wx.LEFT, 3), 
    145145                                       (self.data2_pic, 0, wx.LEFT, 3)]) 
    146         self.name_sizer.AddMany([(new_data_sizer, 0, wx.LEFT|wx.TOP, 5), 
     146        self.name_sizer.AddMany([(new_data_sizer, 0, wx.LEFT | wx.TOP, 5), 
    147147                                       (equal_sizer, 0, wx.TOP, 5), 
    148148                                       (old_data1_sizer, 0, wx.TOP, 5), 
     
    152152 
    153153        self._show_numctrl(self.numberctr, False) 
    154          
     154 
    155155        wx.EVT_TEXT_ENTER(self.data_namectr, -1, self.on_name) 
    156         wx.EVT_TEXT_ENTER(self.numberctr, -1, self.on_number)  
    157         wx.EVT_COMBOBOX(self.data1_cbox, -1, self.on_select_data1)  
    158         wx.EVT_COMBOBOX(self.operator_cbox, -1, self.on_select_operator)  
     156        wx.EVT_TEXT_ENTER(self.numberctr, -1, self.on_number) 
     157        wx.EVT_COMBOBOX(self.data1_cbox, -1, self.on_select_data1) 
     158        wx.EVT_COMBOBOX(self.operator_cbox, -1, self.on_select_operator) 
    159159        wx.EVT_COMBOBOX(self.data2_cbox, -1, self.on_select_data2) 
    160      
    161     def _show_numctrl(self, ctrl, enable=True):   
     160 
     161    def _show_numctrl(self, ctrl, enable=True): 
    162162        """ 
    163163        Show/Hide on Win 
     
    170170                ctrl.GetChildren()[0].SetBackGroundColour(self.color) 
    171171            if enable: 
    172                 wx.EVT_TEXT_ENTER(self.numberctr, -1, self.on_number)  
     172                wx.EVT_TEXT_ENTER(self.numberctr, -1, self.on_number) 
    173173        else: 
    174174            if not ctrl.IsEnabled(): 
    175175                ctrl.Enable(True) 
    176176            ctrl.Show(enable) 
    177              
     177 
    178178    def on_name(self, event=None): 
    179179        """ 
     
    189189        text = item.GetValue().strip() 
    190190        self._check_newname(text) 
    191      
     191 
    192192    def _check_newname(self, name=None): 
    193193        """ 
     
    220220        self.name_sizer.Layout() 
    221221        self.Refresh() 
    222      
    223     def _set_textctrl_color(self, ctrl, color):  
    224         """ 
    225         Set TextCtrl color  
     222 
     223    def _set_textctrl_color(self, ctrl, color): 
     224        """ 
     225        Set TextCtrl color 
    226226        """ 
    227227        if ON_MAC: 
    228228            children = ctrl.GetChildren() 
    229229            if len(children) > 0: 
    230                 children[0].SetBackgroundColour(color)   
    231         else: 
    232             ctrl.SetBackgroundColour(color)   
     230                children[0].SetBackgroundColour(color) 
     231        else: 
     232            ctrl.SetBackgroundColour(color) 
    233233        self.name_sizer.Layout() 
    234                       
     234 
    235235    def on_number(self, event=None): 
    236236        """ 
     
    254254            else: 
    255255                self._set_textctrl_color(self.numberctr, self.color) 
    256          
     256 
    257257        self.put_text_pic(self.data2_pic, content=str(val)) 
    258258        self.check_data_inputs() 
     
    261261        self.draw_output(self.output) 
    262262        self.Refresh() 
    263          
     263 
    264264    def on_select_data1(self, event=None): 
    265265        """ 
     
    272272        if data == None: 
    273273            content = "?" 
    274             self.put_text_pic(self.data1_pic, content)  
     274            self.put_text_pic(self.data1_pic, content) 
    275275        else: 
    276276            self.data1_pic.add_image(data) 
     
    279279            self.output.name = str(self.data_namectr.GetValue()) 
    280280        self.draw_output(self.output) 
    281          
     281 
    282282    def on_select_operator(self, event=None): 
    283283        """ 
     
    287287        item = event.GetEventObject() 
    288288        text = item.GetValue().strip() 
    289         self.put_text_pic(self.operator_pic, content=text)  
     289        self.put_text_pic(self.operator_pic, content=text) 
    290290        self.check_data_inputs() 
    291291        if self.output != None: 
    292292            self.output.name = str(self.data_namectr.GetValue()) 
    293293        self.draw_output(self.output) 
    294          
     294 
    295295    def on_select_data2(self, event=None): 
    296296        """ 
     
    300300        item = event.GetEventObject() 
    301301        text = item.GetValue().strip().lower() 
    302         self._show_numctrl(self.numberctr, text=='number') 
     302        self._show_numctrl(self.numberctr, text == 'number') 
    303303        pos = item.GetCurrentSelection() 
    304304        data = item.GetClientData(pos) 
     
    310310            else: 
    311311                self.data2_pic.add_image(data) 
    312             self.check_data_inputs()  
     312            self.check_data_inputs() 
    313313        else: 
    314314            content = str(self.numberctr.GetValue().strip()) 
     
    323323            if data != None: 
    324324                self.check_data_inputs() 
    325                  
    326             self.put_text_pic(self.data2_pic, content)    
    327          
     325 
     326            self.put_text_pic(self.data2_pic, content) 
     327 
    328328        if self.output != None: 
    329329            self.output.name = str(self.data_namectr.GetValue()) 
    330330        self.draw_output(self.output) 
    331          
    332     def put_text_pic(self, pic=None, content=''):   
     331 
     332    def put_text_pic(self, pic=None, content=''): 
    333333        """ 
    334334        Put text to the pic 
    335335        """ 
    336         pic.set_content(content)  
     336        pic.set_content(content) 
    337337        pic.add_text() 
    338338        pic.draw() 
    339                    
     339 
    340340    def check_data_inputs(self): 
    341341        """ 
     
    352352        pos2 = self.data2_cbox.GetCurrentSelection() 
    353353        data2 = self.data2_cbox.GetClientData(pos2) 
    354          
     354 
    355355        if data2 == None: 
    356356            self.output = None 
     
    375375                    return flag 
    376376            else: 
    377                 self._set_textctrl_color(self.numberctr, self.color ) 
     377                self._set_textctrl_color(self.numberctr, self.color) 
    378378        elif data1.__class__.__name__ != data2.__class__.__name__: 
    379379            self._set_textctrl_color(self.data1_cbox, 'pink') 
     
    394394            return flag 
    395395        return True 
    396      
     396 
    397397    def make_data_out(self, data1, data2): 
    398398        """ 
     
    403403        operator = self.operator_cbox.GetClientData(pos) 
    404404        try: 
    405             exec "output = data1 %s data2"% operator 
     405            exec "output = data1 %s data2" % operator 
    406406        except: 
    407407            raise 
    408408        return output 
    409      
    410      
     409 
     410 
    411411    def draw_output(self, output): 
    412412        """ 
     
    416416        if output == None: 
    417417            content = "?" 
    418             self.put_text_pic(out, content)  
     418            self.put_text_pic(out, content) 
    419419        else: 
    420420            out.add_image(output) 
     
    422422        self.Layout() 
    423423        self.Refresh() 
    424                      
    425     def _layout_button(self):   
     424 
     425    def _layout_button(self): 
    426426        """ 
    427427            Do the layout for the button widgets 
    428         """  
    429         self.bt_apply = wx.Button(self, -1, "Apply", size=(_BOX_WIDTH/2, -1)) 
     428        """ 
     429        self.bt_apply = wx.Button(self, -1, "Apply", size=(_BOX_WIDTH / 2, -1)) 
    430430        app_tip = "Generate the Data and send to Data Explorer." 
    431431        self.bt_apply.SetToolTipString(app_tip) 
    432432        self.bt_apply.Bind(wx.EVT_BUTTON, self.on_click_apply) 
    433          
     433 
    434434        self.bt_help = wx.Button(self, -1, "HELP") 
    435435        app_tip = "Get help on Data Operations." 
    436436        self.bt_help.SetToolTipString(app_tip) 
    437437        self.bt_help.Bind(wx.EVT_BUTTON, self.on_help) 
    438          
    439         self.bt_close = wx.Button(self, -1, 'Close', size=(_BOX_WIDTH/2, -1)) 
     438 
     439        self.bt_close = wx.Button(self, -1, 'Close', size=(_BOX_WIDTH / 2, -1)) 
    440440        self.bt_close.Bind(wx.EVT_BUTTON, self.on_close) 
    441441        self.bt_close.SetToolTipString("Close this panel.") 
    442          
    443         self.button_sizer.AddMany([(PANEL_WIDTH/2, 25), 
     442 
     443        self.button_sizer.AddMany([(PANEL_WIDTH / 2, 25), 
    444444                                   (self.bt_apply, 0, wx.RIGHT, 10), 
    445445                                   (self.bt_help, 0, wx.RIGHT, 10), 
    446446                                   (self.bt_close, 0, wx.RIGHT, 10)]) 
    447          
     447 
    448448    def _do_layout(self): 
    449449        """ 
     
    453453        self._layout_name() 
    454454        self._layout_button() 
    455         self.main_sizer.AddMany([(self.name_sizer, 0, wx.EXPAND|wx.ALL, 10), 
     455        self.main_sizer.AddMany([(self.name_sizer, 0, wx.EXPAND | wx.ALL, 10), 
    456456                                (self.button_sizer, 0, 
    457                                           wx.EXPAND|wx.TOP|wx.BOTTOM, 5)]) 
     457                                          wx.EXPAND | wx.TOP | wx.BOTTOM, 5)]) 
    458458        self.SetSizer(self.main_sizer) 
    459459        self.SetScrollbars(20, 20, 25, 65) 
    460460        self.SetAutoLayout(True) 
    461      
     461 
    462462    def set_panel_on_focus(self, event): 
    463463        """ 
     
    474474            if self.FindFocus() in children: 
    475475                self.fill_data_combox() 
    476           
     476 
    477477    def fill_oprator_combox(self): 
    478478        """ 
    479479        fill the current combobox with the operator 
    480         """    
     480        """ 
    481481        operator_list = [' +', ' -', ' *', " /", " |"] 
    482482        for oper in operator_list: 
     
    484484            self.operator_cbox.SetClientData(pos, str(oper.strip())) 
    485485        self.operator_cbox.SetSelection(0) 
    486          
    487          
     486 
     487 
    488488    def fill_data_combox(self): 
    489489        """ 
     
    545545                    self.data2_cbox.SetClientData(pos2, data) 
    546546                    if str(current1) == str(name): 
    547                       pos_pre1 = pos1  
     547                      pos_pre1 = pos1 
    548548                    if str(current2) == str(name): 
    549549                      pos_pre2 = pos2 
     
    561561                            pos_pre2 = posth2 
    562562                except: 
    563                     continue  
     563                    continue 
    564564        self.data1_cbox.SetSelection(pos_pre1) 
    565565        self.data2_cbox.SetSelection(pos_pre2) 
    566      
     566 
    567567    def get_datalist(self): 
    568568        """ 
     
    573573        else: 
    574574            return {} 
    575              
     575 
    576576    def on_click_apply(self, event): 
    577         """    
     577        """ 
    578578        changes are saved in data object imported to edit 
    579579        """ 
     
    616616        #must post event here 
    617617        event.Skip() 
    618      
    619     def on_help(self, event):     
     618 
     619    def on_help(self, event): 
    620620        """ 
    621621        Bring up the Data Operations Panel Documentation whenever 
    622         the HELP button is clicked.  
    623          
     622        the HELP button is clicked. 
     623 
    624624        Calls DocumentationWindow with the path of the location within the 
    625         documentation tree (after /doc/ ....".  Note that when using old  
    626         versions of Wx (before 2.9) and thus not the release version of  
    627         installers, the help comes up at the top level of the file as  
     625        documentation tree (after /doc/ ....".  Note that when using old 
     626        versions of Wx (before 2.9) and thus not the release version of 
     627        installers, the help comes up at the top level of the file as 
    628628        webbrowser does not pass anything past the # to the browser when it is 
    629629        running "file:///...." 
    630      
     630 
    631631    :param evt: Triggers on clicking the help button 
    632632    """ 
    633                  
     633 
    634634        _TreeLocation = "user/perspectives/calculator/data_operator_help.html" 
    635635        _doc_viewer = DocumentationWindow(self, -1, \ 
    636              _TreeLocation,"Data Operation Help") 
     636             _TreeLocation, "Data Operation Help") 
    637637 
    638638    def disconnect_panels(self): 
     
    644644        self.operator_pic.connect.disconnect() 
    645645        self.data2_pic.connect.disconnect() 
    646      
     646 
    647647    def on_close(self, event): 
    648648        """ 
     
    650650        """ 
    651651        self.parent.OnClose() 
    652          
     652 
    653653    def set_plot_unfocus(self): 
    654654        """ 
    655655        Unfocus on right click 
    656656        """ 
    657      
     657 
    658658    def send_warnings(self, msg='', info='info'): 
    659659        """ 
     
    661661        """ 
    662662        wx.PostEvent(self.parent.parent, StatusEvent(status=msg, info=info)) 
    663            
     663 
    664664class SmallPanel(PlotPanel): 
    665665    """ 
    666666    PlotPanel for Quick plot and masking plot 
    667667    """ 
    668     def __init__(self, parent, id=-1, is_number=False, content='?', **kwargs): 
    669         """ 
    670         """  
     668    def __init__(self, parent, id= -1, is_number=False, content='?', **kwargs): 
     669        """ 
     670        """ 
    671671        PlotPanel.__init__(self, parent, id=id, **kwargs) 
    672672        self.is_number = is_number 
     
    682682        self.add_text() 
    683683        self.figure.subplots_adjust(left=0.1, bottom=0.1) 
    684          
     684 
    685685    def set_content(self, content=''): 
    686686        """ 
     
    688688        """ 
    689689        self.content = str(content) 
    690           
     690 
    691691    def add_toolbar(self): 
    692         """  
     692        """ 
    693693        Add toolbar 
    694694        """ 
    695695        # Not implemented 
    696696        pass 
    697      
     697 
    698698    def on_set_focus(self, event): 
    699699        """ 
     
    730730        #draw         
    731731        self.graph.render(self) 
    732          
     732 
    733733        try: 
    734734            self.figure.delaxes(self.figure.axes[1]) 
     
    738738        self.subplot.tick_params(axis='both', labelsize=9) 
    739739        # Draw zero axis lines 
    740         self.subplot.axhline(linewidth = 1, color='r')   
    741         self.subplot.axvline(linewidth = 1, color='r')        
     740        self.subplot.axhline(linewidth=1, color='r') 
     741        self.subplot.axvline(linewidth=1, color='r') 
    742742 
    743743        self.erase_legend() 
     
    774774        self.subplot.set_xlim((0, 1)) 
    775775        self.subplot.set_ylim((0, 1)) 
    776          
     776 
    777777        try: 
    778778            if self.content != '?': 
     
    788788            new_text = self.subplot.text(str(xpos), str(ypos), str(label), 
    789789                                           fontproperties=font) 
    790             self.textList.append(new_text)   
    791          
     790            self.textList.append(new_text) 
     791 
    792792    def erase_legend(self): 
    793793        """ 
     
    796796        #for ax in self.axes: 
    797797        self.remove_legend(self.subplot) 
    798                       
     798 
    799799    def onMouseMotion(self, event): 
    800800        """ 
    801801        Disable dragging 2D image 
    802802        """ 
    803      
     803 
    804804    def onWheel(self, event): 
    805805        """ 
    806806        """ 
    807       
     807 
    808808    def onLeftDown(self, event): 
    809809        """ 
    810810        Disables LeftDown 
    811811        """ 
    812      
     812 
    813813    def onPick(self, event): 
    814814        """ 
     
    817817        for ax in self.axes: 
    818818            self.remove_legend(ax) 
    819                          
    820      
     819 
     820 
    821821    def draw(self): 
    822822        """ 
     
    827827        else: 
    828828            self.subplot.figure.canvas.resizing = False 
    829             self.subplot.tick_params(axis='both', labelsize=9)      
     829            self.subplot.tick_params(axis='both', labelsize=9) 
    830830            self.erase_legend() 
    831             self.subplot.figure.canvas.draw_idle()  
     831            self.subplot.figure.canvas.draw_idle() 
    832832            try: 
    833833                self.figure.delaxes(self.figure.axes[1]) 
    834834            except: 
    835835                pass 
    836              
    837         
     836 
     837 
    838838    def onContextMenu(self, event): 
    839839        """ 
     
    848848        else: 
    849849            slicerpop.Append(id, '&Toggle Linear/Log Scale') 
    850             wx.EVT_MENU(self, id, self.ontogglescale)      
     850            wx.EVT_MENU(self, id, self.ontogglescale) 
    851851        try: 
    852852            # mouse event 
     
    858858            pos = (pos_x, pos_y + 5) 
    859859        self.PopupMenu(slicerpop, pos) 
    860          
    861     def ontogglescale(self, event):  
     860 
     861    def ontogglescale(self, event): 
    862862        """ 
    863863        On toggle 2d scale 
    864864        """ 
    865         self._onToggleScale(event)   
     865        self._onToggleScale(event) 
    866866        try: 
    867867            # mpl >= 1.1.0 
    868868            self.figure.tight_layout() 
    869869        except: 
    870             self.figure.subplots_adjust(left=0.1, bottom=0.1)  
     870            self.figure.subplots_adjust(left=0.1, bottom=0.1) 
    871871        try: 
    872872            self.figure.delaxes(self.figure.axes[1]) 
    873873        except: 
    874874            pass 
    875          
     875 
    876876    def _onProperties(self, event): 
    877877        """ 
     
    909909                    self._onEVT_FUNC_PROPERTY() 
    910910                dial.Destroy() 
    911           
     911 
    912912    def _onEVT_FUNC_PROPERTY(self, remove_fit=True): 
    913913        """ 
     
    954954        self.set_yscale(_yscale) 
    955955        self.draw() 
    956          
     956 
    957957class DataOperatorWindow(widget.CHILD_FRAME): 
    958958    def __init__(self, parent, manager, *args, **kwds): 
     
    965965        self.SetPosition((25, 10)) 
    966966        self.Show() 
    967      
    968     def OnClose(self, event=None):   
     967 
     968    def OnClose(self, event=None): 
    969969        """ 
    970970        On close event 
     
    975975        self.Destroy() 
    976976 
    977          
     977 
    978978if __name__ == "__main__": 
    979979 
    980     app  = wx.App() 
     980    app = wx.App() 
    981981    widget.CHILD_FRAME = wx.Frame 
    982982    window = DataOperatorWindow(parent=None, data=[], title="Data Editor") 
    983983    app.MainLoop() 
    984   
     984 
Note: See TracChangeset for help on using the changeset viewer.