controls/DebugVariablePanel/DebugVariableTextViewer.py
changeset 2459 21164625b393
parent 2450 5024c19ca8f0
child 2509 9c5f835b031e
--- a/controls/DebugVariablePanel/DebugVariableTextViewer.py	Fri Nov 23 11:01:20 2018 +0100
+++ b/controls/DebugVariablePanel/DebugVariableTextViewer.py	Fri Nov 23 12:13:24 2018 +0100
@@ -24,7 +24,7 @@
 
 
 from __future__ import absolute_import
-from types import TupleType
+from __future__ import division
 
 import wx
 
@@ -87,7 +87,7 @@
         # Check that data is valid regarding DebugVariablePanel
         try:
             values = eval(data)
-            if not isinstance(values, TupleType):
+            if not isinstance(values, tuple):
                 raise ValueError
         except Exception:
             message = _("Invalid value \"%s\" for debug variable") % data
@@ -104,7 +104,7 @@
             # according to the position of mouse in Viewer.
             _width, height = self.ParentControl.GetSize()
             target_idx = self.ParentControl.GetIndex()
-            if y > height / 2:
+            if y > height // 2:
                 target_idx += 1
 
             # Drag'n Drop is an internal is an internal move inside Debug
@@ -209,7 +209,7 @@
 
         # Draw item variable path at Viewer left side
         w, h = gc.GetTextExtent(item_path)
-        gc.DrawText(item_path, 20, (height - h) / 2)
+        gc.DrawText(item_path, 20, (height - h) // 2)
 
         # Update 'Release' button state and text color according to item forced
         # flag value
@@ -222,7 +222,7 @@
         # Draw item current value at right side of Viewer
         item_value = item.GetValue()
         w, h = gc.GetTextExtent(item_value)
-        gc.DrawText(item_value, width - 40 - w, (height - h) / 2)
+        gc.DrawText(item_value, width - 40 - w, (height - h) // 2)
 
         # Draw other Viewer common elements
         self.DrawCommonElements(gc)