Python3 / PyPy compatibility
Bug #966796 reported by
rockachu2
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
PyGL3Display |
Confirmed
|
Medium
|
David Griffin |
Bug Description
>>> from opengl.GL import *
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named opengl.GL
>>> from OpenGL.GL import *
>>>
Most of the examples/maybe some core code runs and asks for a module of OpenGL.GL. Unfortunately, it appears python 3.2 does not create a module for a directory, so this results in an error, whereas importing the whole directory doesn't result in an error.
For ease-of-use, you could place a module called 'gl' and in it:
from OpenGL.GL import *
and thus just import gl in the situations you need opengl, but that seems a rather inefficient way to do it, although I can't come up with a better solution.
Changed in pygl3display: | |
status: | New → Incomplete |
importance: | Undecided → Low |
To post a comment you must log in.
I'm not able to reproduce this error. I ran the 2to3 tool over PyOpenGL and...
habilain@ HABTOP: ~/Downloads/ temp/PyOpenGL- 3.0.2a5$ python3
Python 3.2.2 (default, Sep 5 2011, 21:17:14)
[GCC 4.6.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import OpenGL
>>> import OpenGL.GL
>>> from OpenGL.GL import *
Which would indicate that all is well. I also did a quick search over my files and "opengl.GL" never occurs, and incidentally also stops the programs running on Python 2.
Now, I've no idea on actual Python 3 compatibility of PyGL3Display. I tried to compile pygame for Python 3 and, well, it won't work. Not sure what's causing that.
However, I've got to point out: Python 3 compatibility is not a priority. The goal of PyGL3Display is high performance, and, as such the main priority has to be removing the dependency on PyGame entirely so that it can run on top of PyPy - which is (presently) a Python 2 implementation.