# HG changeset patch
# User Andrey Skvortsov <andrej.skvortzov@gmail.com>
# Date 1538644036 -10800
# Node ID dbc065a2f7a5d3ef2d8ce1766056cfca8912b350
# Parent  6923074540ddd1f73851eb78963edba5fe6e35eb
python3 support: pylint, W1613          # (xrange-builtin) xrange built-in referenced

diff -r 6923074540dd -r dbc065a2f7a5 BeremizIDE.py
--- a/BeremizIDE.py	Thu Oct 04 11:25:42 2018 +0300
+++ b/BeremizIDE.py	Thu Oct 04 12:07:16 2018 +0300
@@ -35,7 +35,7 @@
 from time import time as gettime
 from threading import Lock, Timer, currentThread
 
-from six.moves import cPickle
+from six.moves import cPickle, xrange
 import wx.lib.buttons
 import wx.lib.statbmp
 import wx.stc
diff -r 6923074540dd -r dbc065a2f7a5 IDEFrame.py
--- a/IDEFrame.py	Thu Oct 04 11:25:42 2018 +0300
+++ b/IDEFrame.py	Thu Oct 04 12:07:16 2018 +0300
@@ -30,7 +30,7 @@
 import wx
 import wx.grid
 import wx.aui
-from six.moves import cPickle
+from six.moves import cPickle, xrange
 
 from editors.EditorPanel import EditorPanel
 from editors.SFCViewer import SFC_Viewer
diff -r 6923074540dd -r dbc065a2f7a5 PLCGenerator.py
--- a/PLCGenerator.py	Thu Oct 04 11:25:42 2018 +0300
+++ b/PLCGenerator.py	Thu Oct 04 12:07:16 2018 +0300
@@ -26,6 +26,8 @@
 from __future__ import absolute_import
 from types import *
 import re
+from six.moves import xrange
+
 from plcopen import PLCOpenParser
 from plcopen.structures import *
 from plcopen.types_enums import *
diff -r 6923074540dd -r dbc065a2f7a5 ProjectController.py
--- a/ProjectController.py	Thu Oct 04 11:25:42 2018 +0300
+++ b/ProjectController.py	Thu Oct 04 12:07:16 2018 +0300
@@ -41,6 +41,7 @@
 from datetime import datetime
 from weakref import WeakKeyDictionary
 from itertools import izip
+from six.moves import xrange
 
 import wx
 
diff -r 6923074540dd -r dbc065a2f7a5 controls/CustomStyledTextCtrl.py
--- a/controls/CustomStyledTextCtrl.py	Thu Oct 04 11:25:42 2018 +0300
+++ b/controls/CustomStyledTextCtrl.py	Thu Oct 04 12:07:16 2018 +0300
@@ -26,6 +26,7 @@
 from __future__ import absolute_import
 import wx
 import wx.stc
+from six.moves import xrange
 
 if wx.Platform == '__WXMSW__':
     faces = {
diff -r 6923074540dd -r dbc065a2f7a5 controls/DebugVariablePanel/DebugVariableGraphicViewer.py
--- a/controls/DebugVariablePanel/DebugVariableGraphicViewer.py	Thu Oct 04 11:25:42 2018 +0300
+++ b/controls/DebugVariablePanel/DebugVariableGraphicViewer.py	Thu Oct 04 12:07:16 2018 +0300
@@ -36,6 +36,7 @@
 from matplotlib.backends.backend_wxagg import _convert_agg_to_wx_bitmap
 from matplotlib.backends.backend_agg import FigureCanvasAgg
 from mpl_toolkits.mplot3d import Axes3D
+from six.moves import xrange
 
 from editors.DebugViewer import REFRESH_PERIOD
 from controls.DebugVariablePanel.DebugVariableViewer import *
diff -r 6923074540dd -r dbc065a2f7a5 controls/FolderTree.py
--- a/controls/FolderTree.py	Thu Oct 04 11:25:42 2018 +0300
+++ b/controls/FolderTree.py	Thu Oct 04 12:07:16 2018 +0300
@@ -27,6 +27,7 @@
 import os
 
 import wx
+from six.moves import xrange
 
 from util.BitmapLibrary import GetBitmap
 
diff -r 6923074540dd -r dbc065a2f7a5 controls/LogViewer.py
--- a/controls/LogViewer.py	Thu Oct 04 11:25:42 2018 +0300
+++ b/controls/LogViewer.py	Thu Oct 04 12:07:16 2018 +0300
@@ -30,6 +30,7 @@
 
 import numpy
 import wx
+from six.moves import xrange
 
 from controls.CustomToolTip import CustomToolTip, TOOLTIP_WAIT_PERIOD
 from editors.DebugViewer import DebugViewer, REFRESH_PERIOD
diff -r 6923074540dd -r dbc065a2f7a5 controls/VariablePanel.py
--- a/controls/VariablePanel.py	Thu Oct 04 11:25:42 2018 +0300
+++ b/controls/VariablePanel.py	Thu Oct 04 12:07:16 2018 +0300
@@ -30,6 +30,7 @@
 import wx
 import wx.grid
 import wx.lib.buttons
+from six.moves import xrange
 
 from plcopen.structures import LOCATIONDATATYPES, TestIdentifier, IEC_KEYWORDS, DefaultType
 from plcopen.VariableInfoCollector import _VariableInfos
diff -r 6923074540dd -r dbc065a2f7a5 dialogs/DiscoveryDialog.py
--- a/dialogs/DiscoveryDialog.py	Thu Oct 04 11:25:42 2018 +0300
+++ b/dialogs/DiscoveryDialog.py	Thu Oct 04 12:07:16 2018 +0300
@@ -26,10 +26,12 @@
 
 from __future__ import absolute_import
 import socket
+from six.moves import xrange
 import wx
 import wx.lib.mixins.listctrl as listmix
 from zeroconf import ServiceBrowser, Zeroconf
 
+
 service_type = '_PYRO._tcp.local.'
 
 
diff -r 6923074540dd -r dbc065a2f7a5 editors/CodeFileEditor.py
--- a/editors/CodeFileEditor.py	Thu Oct 04 11:25:42 2018 +0300
+++ b/editors/CodeFileEditor.py	Thu Oct 04 12:07:16 2018 +0300
@@ -30,6 +30,7 @@
 import wx.grid
 import wx.stc as stc
 import wx.lib.buttons
+from six.moves import xrange
 
 from plcopen.plcopen import TestTextElement
 from plcopen.structures import TestIdentifier, IEC_KEYWORDS, DefaultType
diff -r 6923074540dd -r dbc065a2f7a5 editors/DataTypeEditor.py
--- a/editors/DataTypeEditor.py	Thu Oct 04 11:25:42 2018 +0300
+++ b/editors/DataTypeEditor.py	Thu Oct 04 12:07:16 2018 +0300
@@ -27,6 +27,7 @@
 from __future__ import absolute_import
 import re
 from types import TupleType
+from six.moves import xrange
 
 import wx
 import wx.grid
diff -r 6923074540dd -r dbc065a2f7a5 editors/LDViewer.py
--- a/editors/LDViewer.py	Thu Oct 04 11:25:42 2018 +0300
+++ b/editors/LDViewer.py	Thu Oct 04 12:07:16 2018 +0300
@@ -27,6 +27,7 @@
 from types import *
 
 import wx
+from six.moves import xrange
 
 from editors.Viewer import *
 
diff -r 6923074540dd -r dbc065a2f7a5 editors/ResourceEditor.py
--- a/editors/ResourceEditor.py	Thu Oct 04 11:25:42 2018 +0300
+++ b/editors/ResourceEditor.py	Thu Oct 04 12:07:16 2018 +0300
@@ -27,6 +27,7 @@
 import wx
 import wx.lib.buttons
 import wx.grid
+from six.moves import xrange
 
 from graphics.GraphicCommons import REFRESH_HIGHLIGHT_PERIOD, ERROR_HIGHLIGHT
 from controls import CustomGrid, CustomTable, DurationCellEditor
diff -r 6923074540dd -r dbc065a2f7a5 editors/TextViewer.py
--- a/editors/TextViewer.py	Thu Oct 04 11:25:42 2018 +0300
+++ b/editors/TextViewer.py	Thu Oct 04 12:07:16 2018 +0300
@@ -29,6 +29,7 @@
 
 import wx
 import wx.stc
+from six.moves import xrange
 
 from graphics.GraphicCommons import ERROR_HIGHLIGHT, SEARCH_RESULT_HIGHLIGHT, REFRESH_HIGHLIGHT_PERIOD
 from plcopen.structures import ST_BLOCK_START_KEYWORDS, IEC_BLOCK_START_KEYWORDS, LOCATIONDATATYPES
diff -r 6923074540dd -r dbc065a2f7a5 editors/Viewer.py
--- a/editors/Viewer.py	Thu Oct 04 11:25:42 2018 +0300
+++ b/editors/Viewer.py	Thu Oct 04 12:07:16 2018 +0300
@@ -30,6 +30,7 @@
 from threading import Lock
 
 import wx
+from six.moves import xrange
 
 from plcopen.structures import *
 from plcopen.types_enums import ComputePouName
diff -r 6923074540dd -r dbc065a2f7a5 graphics/FBD_Objects.py
--- a/graphics/FBD_Objects.py	Thu Oct 04 11:25:42 2018 +0300
+++ b/graphics/FBD_Objects.py	Thu Oct 04 12:07:16 2018 +0300
@@ -25,6 +25,7 @@
 
 from __future__ import absolute_import
 import wx
+from six.moves import xrange
 
 from graphics.GraphicCommons import *
 from plcopen.structures import *
diff -r 6923074540dd -r dbc065a2f7a5 graphics/GraphicCommons.py
--- a/graphics/GraphicCommons.py	Thu Oct 04 11:25:42 2018 +0300
+++ b/graphics/GraphicCommons.py	Thu Oct 04 12:07:16 2018 +0300
@@ -26,6 +26,7 @@
 from __future__ import absolute_import
 from math import *
 from types import *
+from six.moves import xrange
 
 import wx
 from graphics.ToolTipProducer import ToolTipProducer
diff -r 6923074540dd -r dbc065a2f7a5 graphics/LD_Objects.py
--- a/graphics/LD_Objects.py	Thu Oct 04 11:25:42 2018 +0300
+++ b/graphics/LD_Objects.py	Thu Oct 04 12:07:16 2018 +0300
@@ -25,6 +25,7 @@
 
 from __future__ import absolute_import
 import wx
+from six.moves import xrange
 
 from graphics.GraphicCommons import *
 from graphics.DebugDataConsumer import DebugDataConsumer
diff -r 6923074540dd -r dbc065a2f7a5 graphics/SFC_Objects.py
--- a/graphics/SFC_Objects.py	Thu Oct 04 11:25:42 2018 +0300
+++ b/graphics/SFC_Objects.py	Thu Oct 04 12:07:16 2018 +0300
@@ -25,6 +25,7 @@
 
 from __future__ import absolute_import
 import wx
+from six.moves import xrange
 
 from graphics.GraphicCommons import *
 from graphics.DebugDataConsumer import DebugDataConsumer
diff -r 6923074540dd -r dbc065a2f7a5 modbus/mb_utils.py
--- a/modbus/mb_utils.py	Thu Oct 04 11:25:42 2018 +0300
+++ b/modbus/mb_utils.py	Thu Oct 04 12:07:16 2018 +0300
@@ -22,6 +22,8 @@
 # This code is made available on the understanding that it will not be
 # used in safety-critical situations without a full and competent review.
 
+from __future__ import absolute_import
+from six.moves import xrange
 
 # dictionary implementing:
 # key   - string with the description we want in the request plugin GUI
diff -r 6923074540dd -r dbc065a2f7a5 modbus/modbus.py
--- a/modbus/modbus.py	Thu Oct 04 11:25:42 2018 +0300
+++ b/modbus/modbus.py	Thu Oct 04 12:07:16 2018 +0300
@@ -25,8 +25,9 @@
 
 from __future__ import absolute_import
 import os
+from six.moves import xrange
+
 from modbus.mb_utils import *
-
 from ConfigTreeNode import ConfigTreeNode
 from PLCControler import LOCATION_CONFNODE, LOCATION_VAR_MEMORY
 
diff -r 6923074540dd -r dbc065a2f7a5 plcopen/plcopen.py
--- a/plcopen/plcopen.py	Thu Oct 04 11:25:42 2018 +0300
+++ b/plcopen/plcopen.py	Thu Oct 04 12:07:16 2018 +0300
@@ -29,6 +29,7 @@
 import re
 from collections import OrderedDict
 
+from six.moves import xrange
 from lxml import etree
 
 from xmlclass import *
diff -r 6923074540dd -r dbc065a2f7a5 runtime/PLCObject.py
--- a/runtime/PLCObject.py	Thu Oct 04 11:25:42 2018 +0300
+++ b/runtime/PLCObject.py	Thu Oct 04 12:07:16 2018 +0300
@@ -32,7 +32,7 @@
 import _ctypes  # pylint: disable=wrong-import-order
 import Pyro.core as pyro
 import six
-from six.moves import _thread
+from six.moves import _thread, xrange
 
 from runtime.typemapping import TypeTranslator
 from runtime.loglevels import LogLevelsDefault, LogLevelsCount
diff -r 6923074540dd -r dbc065a2f7a5 tests/tools/check_source.sh
--- a/tests/tools/check_source.sh	Thu Oct 04 11:25:42 2018 +0300
+++ b/tests/tools/check_source.sh	Thu Oct 04 12:07:16 2018 +0300
@@ -350,6 +350,7 @@
 
     # python3 compatibility checks
     enable=$enable,W1648          # (bad-python3-import) Module moved in Python 3
+    enable=$enable,W1613          # (xrange-builtin) xrange built-in referenced
     # enable=
 
     options=
diff -r 6923074540dd -r dbc065a2f7a5 xmlclass/xmlclass.py
--- a/xmlclass/xmlclass.py	Thu Oct 04 11:25:42 2018 +0300
+++ b/xmlclass/xmlclass.py	Thu Oct 04 12:07:16 2018 +0300
@@ -32,7 +32,7 @@
 from xml.dom import minidom
 from xml.sax.saxutils import unescape
 from collections import OrderedDict
-
+from six.moves import xrange
 from lxml import etree