Re: [PyOpenGL-Users] crash on import on Mac OS X after xml-generation merge explained
Brought to you by:
mcfletch
From: Mike C. F. <mcf...@vr...> - 2014-01-30 21:09:49
|
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 |