[GRASS-SVN] r74101 - in grass/trunk/gui/wxpython: gui_core tplot

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Feb 17 12:53:15 PST 2019


Author: annakrat
Date: 2019-02-17 12:53:15 -0800 (Sun, 17 Feb 2019)
New Revision: 74101

Modified:
   grass/trunk/gui/wxpython/gui_core/gselect.py
   grass/trunk/gui/wxpython/tplot/frame.py
Log:
wxGUI/tplot: fix for Python 3

Modified: grass/trunk/gui/wxpython/gui_core/gselect.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/gselect.py	2019-02-17 20:38:08 UTC (rev 74100)
+++ grass/trunk/gui/wxpython/gui_core/gselect.py	2019-02-17 20:53:15 UTC (rev 74101)
@@ -2456,7 +2456,7 @@
 
             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]))

Modified: grass/trunk/gui/wxpython/tplot/frame.py
===================================================================
--- grass/trunk/gui/wxpython/tplot/frame.py	2019-02-17 20:38:08 UTC (rev 74100)
+++ grass/trunk/gui/wxpython/tplot/frame.py	2019-02-17 20:53:15 UTC (rev 74101)
@@ -686,7 +686,7 @@
                 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 @@
                 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 @@
                 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])



More information about the grass-commit mailing list