Re: Help: glReadPixels error on OS X
Chris Barker - NOAA Federal <[email protected]> Thu, 23 May 2013 10:00:58 -0700
| Newsgroups | gmane.comp.python.opengl.user |
|---|---|
| Message-ID | <CALGmxE+0LXxQxEMupAGvcyOXVruDHhpCFWBu_T0tAuXjZ_dnOw@mail.gmail.com> |
On Thu, May 23, 2013 at 7:15 AM, Ian Mallett <[email protected]> wrote: > Instead of: > pixel = ord(pixel[0]), ord(pixel[1]), ord(pixel[2]) > Try this: > pixel = pixel[0][0][0],pixel[1][0][0],pixel[2][0][0] > Python 3 handles strings much differently from Python 2. I suspect PyOpenGL > was changed, intentionally, to make this string functionality consistent > across Python versions. couldn't it return a bytes object in both cases? (which is a string on py2, of course...) or maybe even better an array.array object. (just sayin') -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception [email protected] ------------------------------------------------------------------------------ Try New Relic Now & We'll Send You this Cool Shirt New Relic is the only SaaS-based application performance monitoring service that delivers powerful full stack analytics. Optimize and monitor your browser, app, & servers with just a few lines of code. Try New Relic and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may _______________________________________________ PyOpenGL Homepage http://pyopengl.sourceforge.net