Re: crash on import on Mac OS X after xml-generation merge explained

"Mike C. Fletcher" <[email protected]> Thu, 30 Jan 2014 16:09:41 -0500
Newsgroups gmane.comp.python.opengl.user
Message-ID <[email protected]>
On 14-01-29 09:16 AM, rndblnch wrote:
...
>
> i have done some testing with python3 too, and got a couple of syntax errors
> because the keyword "in" is used as argument name by two functions.
> the patch below shows where it happens (the fix should probably done at the
> generator level though):
I've fixed that, and run all of the parameter names through a test to 
filter out *any* python keyword (on the python (2.7) on which the 
generator is run).  Note that I went with the suffixed rather than 
prefixed for (in_ rather than _in) for the names.  Those were the only 
cases found with that check, btw.

> and a quick remark: a Logger instance named log is imported into the global
> namespace, so it shadows the math function when doing something like that:
> """
> from math import log
> from OpenGL.GLUT import *
> """
> perhaps it could be possible to exclude it from * import (by setting a
> __all__, or using _log as its name)?
> not very important, i know...
I've eliminated a couple of other name-pollution issues, but there's 
still a dozen or so "shouldn't be there" names in the final import 
namespace for GL.  Unfortunately, using __all__ rather bloats the 
modules (there's a *lot* of names in the namespaces). So I've been doing 
that cleanup one-by-one with renames to _ prefixed names.

I'll need to re-run the Linux tests, as those changes have modified 
*hundreds* of files, and then I still need to get the basic Win32 tests 
done to do the beta 1 release.

Thanks,
Mike

-- 
________________________________________________
   Mike C. Fletcher
   Designer, VR Plumber, Coder
   http://www.vrplumber.com
   http://blog.vrplumber.com


------------------------------------------------------------------------------
WatchGuard Dimension instantly turns raw network data into actionable 
security intelligence. It gives you real-time visual feedback on key
security issues and trends.  Skip the complicated setup - simply import
a virtual appliance and go from zero to informed in seconds.
http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk
_______________________________________________
PyOpenGL Homepage
http://pyopengl.sourceforge.net