Browse Source

wxGUI/tplot: fix for Python 3

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@74101 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 6 years ago
parent
commit
f2abecd21e
2 changed files with 4 additions and 4 deletions
  1. 1 1
      gui/wxpython/gui_core/gselect.py
  2. 3 3
      gui/wxpython/tplot/frame.py

+ 1 - 1
gui/wxpython/gui_core/gselect.py

@@ -2456,7 +2456,7 @@ class CoordinatesSelect(Panel):
 
             coords = self._getCoords()
             if coords is not None:
-                for i in range(len(coords) / 2):
+                for i in range(len(coords) // 2):
                     i = i * 2
                     self.pointsToDraw.AddItem(
                         coords=(coords[i], coords[i + 1]))

+ 3 - 3
gui/wxpython/tplot/frame.py

@@ -686,7 +686,7 @@ class TplotFrame(wx.Frame):
                 return
             self.lookUp.AddDataset(yranges=ydata, xranges=xdata,
                                    datasetName=name)
-            color = self.colors.next()
+            color = next(self.colors)
             self.plots.append(self.axes2d.plot(xdata, ydata, marker='o',
                                                color=color,
                                                label=self.plotNameListR[i])[0])
@@ -733,7 +733,7 @@ class TplotFrame(wx.Frame):
                 continue
             self.lookUp.AddDataset(yranges=ydata, xranges=xdata,
                                    datasetName=name)
-            color = self.colors.next()
+            color = next(self.colors)
 
             self.plots.append(
                 self.axes2d.plot(
@@ -778,7 +778,7 @@ class TplotFrame(wx.Frame):
                 return
             self.lookUp.AddDataset(yranges=ydata, xranges=xdata,
                                    datasetName=name)
-            color = self.colors.next()
+            color = next(self.colors)
 
             self.plots.append(self.axes2d.plot(xdata, ydata, marker='o',
                                                color=color, label=name)[0])