clean etherlab: pylint, W0404 # reimported module
authorAndrey Skvortsov <andrej.skvortzov@gmail.com>
Sat, 29 Sep 2018 16:17:04 +0300
changeset 2389 f86eefc8d378
parent 2388 13acfd8d33e6
child 2390 81116c5db60f
clean etherlab: pylint, W0404 # reimported module
etherlab/EtherCATManagementEditor.py
etherlab/runtime_etherlab.py
--- a/etherlab/EtherCATManagementEditor.py	Sat Sep 29 15:41:20 2018 +0300
+++ b/etherlab/EtherCATManagementEditor.py	Sat Sep 29 16:17:04 2018 +0300
@@ -20,7 +20,6 @@
 
 # ------------ for SDO Management --------------------
 import string
-import wx.grid as gridlib
 # -------------------------------------------------------------
 
 # ------------ for register management ---------------
@@ -571,7 +570,7 @@
         attr = wx.grid.GridCellAttr()
 
         # for SDO download
-        self.Bind(gridlib.EVT_GRID_CELL_LEFT_DCLICK, self.SDOModifyDialog)
+        self.Bind(wx.grid.EVT_GRID_CELL_LEFT_DCLICK, self.SDOModifyDialog)
 
         for i in range(7):
             self.SetColAttr(i, attr)
@@ -647,7 +646,7 @@
         """
         Create dialog for SDO value modify
         if user enter data, perform command "ethercat download"
-        @param event : gridlib.EVT_GRID_CELL_LEFT_DCLICK object
+        @param event : wx.grid.EVT_GRID_CELL_LEFT_DCLICK object
         """
         self.ClearStateFlag()
 
@@ -1947,9 +1946,9 @@
         wx.grid.Grid.__init__(self, parent, -1, size=(820, 300),
                               style=wx.EXPAND | wx.ALIGN_CENTRE_HORIZONTAL | wx.ALIGN_CENTER_VERTICAL)
 
-        for evt, mapping_method in [(gridlib.EVT_GRID_CELL_LEFT_CLICK, self.OnSelectCell),
-                                    (gridlib.EVT_GRID_CELL_LEFT_CLICK, self.OnSelectCell),
-                                    (gridlib.EVT_GRID_CELL_LEFT_DCLICK, self.OnRegModifyDialog)]:
+        for evt, mapping_method in [(wx.grid.EVT_GRID_CELL_LEFT_CLICK, self.OnSelectCell),
+                                    (wx.grid.EVT_GRID_CELL_LEFT_CLICK, self.OnSelectCell),
+                                    (wx.grid.EVT_GRID_CELL_LEFT_DCLICK, self.OnRegModifyDialog)]:
             self.Bind(evt, mapping_method)
 
     def SetValue(self, parent, reg_monitor_data, low_index, high_index):
@@ -1990,7 +1989,7 @@
     def OnSelectCell(self, event):
         """
             Handles the event of the cell of the main table.
-            @param event: gridlib object (left click)
+            @param event: wx.grid object (left click)
             """
         # if reg_monitor_data is 0, it is initialization of register access.
         if self.RegMonitorData == 0:
@@ -2032,7 +2031,7 @@
         """
         Handle the event of the cell of the main table.
         Display the window where the user modifies the value of the cell.
-        @param event: gridlib object (double click)
+        @param event: wx.grid object (double click)
             """
         # user can enter a value in case that user double-clicked 'Dec' or 'Hex' value.
         if event.GetCol() == 1 or event.GetCol() == 2:
--- a/etherlab/runtime_etherlab.py	Sat Sep 29 15:41:20 2018 +0300
+++ b/etherlab/runtime_etherlab.py	Sat Sep 29 16:17:04 2018 +0300
@@ -3,7 +3,6 @@
 import sys
 import ctypes
 from threading import Thread
-import ctypes
 import time
 import re
 from targets.typemapping import LogLevelsDict