--- a/modbus/mb_utils.py Fri Nov 23 11:01:20 2018 +0100
+++ b/modbus/mb_utils.py Fri Nov 23 12:13:24 2018 +0100
@@ -22,6 +22,9 @@
# 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 __future__ import division
+from six.moves import xrange
# dictionary implementing:
# key - string with the description we want in the request plugin GUI
@@ -185,7 +188,7 @@
{%(buffer)s}, {%(buffer)s}}'''
timeout = int(GetCTVal(child, 4))
- timeout_s = int(timeout / 1000)
+ timeout_s = timeout // 1000
timeout_ms = timeout - (timeout_s * 1000)
timeout_ns = timeout_ms * 1000000