--- a/graphics/FBD_Objects.py Mon Mar 27 10:19:14 2023 +0200
+++ b/graphics/FBD_Objects.py Fri Oct 28 12:39:15 2022 +0800
@@ -23,8 +23,8 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-from __future__ import absolute_import
-from __future__ import division
+
+
import wx
from six.moves import xrange
@@ -78,7 +78,7 @@
return block
def GetConnectorTranslation(self, element):
- return dict(zip(self.Inputs + self.Outputs, element.Inputs + element.Outputs))
+ return dict(list(zip(self.Inputs + self.Outputs, element.Inputs + element.Outputs)))
def Flush(self):
for input in self.Inputs:
@@ -165,7 +165,7 @@
linesize = max((self.Size[1] - BLOCK_LINE_SIZE) // lines, BLOCK_LINE_SIZE)
# Update inputs and outputs positions
position = BLOCK_LINE_SIZE + linesize // 2
- for i in xrange(lines):
+ for i in range(lines):
if scaling is not None:
ypos = round_scaling(self.Pos.y + position, scaling[1]) - self.Pos.y
else:
@@ -256,7 +256,7 @@
outputs = [output for output in blocktype["outputs"]]
if blocktype["extensible"]:
start = int(inputs[-1][0].replace("IN", ""))
- for dummy in xrange(self.Extension - len(blocktype["inputs"])):
+ for dummy in range(self.Extension - len(blocktype["inputs"])):
start += 1
inputs.append(("IN%d" % start, inputs[-1][1], inputs[-1][2]))
comment = blocktype["comment"]
@@ -451,7 +451,7 @@
if highlight_type is None:
self.Highlights = {}
else:
- highlight_items = self.Highlights.items()
+ highlight_items = list(self.Highlights.items())
for name, highlights in highlight_items:
highlights = ClearHighlights(highlights, highlight_type)
if len(highlights) == 0: