[Python-talk] mat3d error
Labitt, Bruce
labittb1 at tycoelectronics.com
Fri Sep 12 10:09:22 EDT 2008
Sorry, I added the periods. <sheepish grin>
OK, I just found something funky. I have python spread out over too
places - i.e, I have a python in /usr/lib AND in /usr/lib64 !!!
I think I'd like it only in lib64. So I have site-packages in both
locations...
Umm, how do I clean this up?
# ldd /usr/bin/python reveals
things are in /lib64
But when I used easy_install, it put stuff into
/usr/lib/python2.4/site-packages
instead of /usr/lib64/python2.4/site-packages
???
-Bruce
-----Original Message-----
From: Python [mailto:python at venix.com]
Sent: Thursday, September 11, 2008 6:45 PM
To: Labitt, Bruce
Cc: python-talk at dlslug.org
Subject: RE: [Python-talk] mat3d error
On Thu, 2008-09-11 at 17:37 -0400, Labitt, Bruce wrote:
> OK, found that. I needed a tab, instead of two spaces. Jeesh.
>
> Width is: 640.
> Height is: 480.
Did you add the periods? If not, those are floats, not ints. You can
convert to int as simply as
int(width)
which truncates the fractional part of the float.
If they are really ints, then you were absolutely right to prefer to
strictly look at the configuration issues. It would appear that the
array conversion routines in openGL/GL/images.py are breaking something.
> GL_RGB is: GL_RGB (6407)
> GL_UNSIGNED_BYTE is: GL_UNSIGNED_BYTE (5121)
>
> how is an unsigned byte > 255 ?
good question. Apparently it is encoding the type info.
"""OpenGL-wide constant types (not OpenGL.GL-specific"""
import ctypes
from OpenGL.constant import Constant
GL_FALSE = Constant( 'GL_FALSE', 0x0 )
GL_TRUE = Constant( 'GL_TRUE', 0x1 )
GL_BYTE = Constant( 'GL_BYTE', 0x1400 )
GL_UNSIGNED_BYTE = Constant( 'GL_UNSIGNED_BYTE', 0x1401 )
GL_SHORT = Constant( 'GL_SHORT', 0x1402 )
GL_UNSIGNED_SHORT = Constant( 'GL_UNSIGNED_SHORT', 0x1403 )
GL_INT = Constant( 'GL_INT', 0x1404 )
GL_UNSIGNED_INT = Constant( 'GL_UNSIGNED_INT', 0x1405 )
GL_FLOAT = Constant( 'GL_FLOAT', 0x1406 )
GL_DOUBLE = Constant( 'GL_DOUBLE', 0x140a )
GL_CHAR = str
GL_HALF_NV = Constant( 'GL_HALF_NV', 0x1401 )
>
> -Bruce
>
> -----Original Message-----
> From: python-talk-bounces at dlslug.org
> [mailto:python-talk-bounces at dlslug.org] On Behalf Of Labitt, Bruce
> Sent: Thursday, September 11, 2008 5:12 PM
> To: Python
> Cc: python-talk at dlslug.org
> Subject: Re: [Python-talk] mat3d error
>
> I thought I fixed that. Now I'm getting
>
> IndentationError: unindent does not match any outer indentation level
>
> -Bruce
>
> -----Original Message-----
> From: Python [mailto:python at venix.com]
> Sent: Thursday, September 11, 2008 4:54 PM
> To: Labitt, Bruce
> Cc: python-talk at dlslug.org
> Subject: RE: [Python-talk] mat3d error
>
> Python is sensitive to leading space. The indentation of your source
> code is not just pretty printing. It defines the nesting of your code
> blocks.
>
> I presume that print was too far to the left or right. Line the first
> character up exactly with line 645 below it. (A fixed width font
> helps.)
>
> On Thu, 2008-09-11 at 16:41 -0400, Labitt, Bruce wrote:
> > But I get the following error:
> > print "width is:", width
> > ^
> >
> > SyntaxError: invalid syntax
> >
> > What am I doing wrong?
> >
> > -Bruce
> >
> > -----Original Message-----
> > From: python-talk-bounces at dlslug.org
> > [mailto:python-talk-bounces at dlslug.org] On Behalf Of Labitt, Bruce
> > Sent: Thursday, September 11, 2008 4:33 PM
> > To: Python
> > Cc: python-talk at dlslug.org
> > Subject: Re: [Python-talk] mat3d error
> >
> > Umm, I figured out the line # part
> >
> >
> > Could you add the line
> > print "width is:", width
> > into the mat3d.py file to send some debugging info to the console?
> >
> > [Labitt, Bruce] Thanks
> > _______________________________________________
> > Python-talk mailing list
> > Python-talk at dlslug.org
> > http://dlslug.org/mailman/listinfo/python-talk
--
Lloyd Kvam
Venix Corp
DLSLUG/GNHLUG library
http://dlslug.org/library.html
http://www.librarything.com/catalog/dlslug
http://www.librarything.com/rsshtml/recent/dlslug
http://www.librarything.com/rss/recent/dlslug
More information about the Python-talk
mailing list