mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2025-12-15 17:20:07 +01:00
py3: use six.moves.range instead of xrange
The xrange module was removed in Python 3 and we should use 'six.moves.range' instead of 'xrange' to make code compatible with py 2 and 3 as well.
This commit is contained in:
@@ -14,6 +14,7 @@ I think it's easier with FloatCavnas, and you get zoomign and scrolling to boot!
|
||||
"""
|
||||
|
||||
import wx
|
||||
from six import moves
|
||||
from math import *
|
||||
|
||||
try: # see if there is a local FloatCanvas to use
|
||||
@@ -53,7 +54,7 @@ class DrawFrame(wx.Frame):
|
||||
Canvas = self.Canvas
|
||||
phi = (sqrt(5) + 1)/2 - 1
|
||||
oradius = 10.0
|
||||
for i in xrange(720):
|
||||
for i in moves.xrange(720):
|
||||
radius = 1.5 * oradius * sin(i * pi/720)
|
||||
Color = (255*(i / 720.), 255*( i / 720.), 255 * 0.25)
|
||||
x = oradius + 0.25*i*cos(phi*i*2*pi)
|
||||
|
||||
Reference in New Issue
Block a user