jsvine / spectra

Easy color scales and color conversion for Python.
http://nbviewer.ipython.org/github/jsvine/spectra/blob/master/docs/walkthrough.ipynb
MIT License
258 stars 12 forks source link

NameError: name 'xrange' is not defined #2

Closed cameron-finn closed 9 years ago

cameron-finn commented 9 years ago

I got this error while going through the documentation.

/usr/local/lib/python3.4/dist-packages/spectra/core.py in range(self, count) 99 distance = dom[-1] - dom[0] 100 props = [ self(dom[0] + distance * float(x)/(count-1)) --> 101 for x in xrange(count) ] 102 return props

NameError: name 'xrange' is not defined

jsvine commented 9 years ago

Thanks for flagging, @cameron-finn! I goofed up on the python3 support. Should be fixed now, in v0.0.4: https://github.com/jsvine/spectra/commit/873f8b763cfa761d1d78886f5e65ecd3caabf5b6. Let me know if you run into any other bugs.