mcfletch / openglcontext

PyOpenGL testing/demonstration context
Other
10 stars 5 forks source link

Exceptions raised in Python 2.x syntax causing syntax error in Python 3.x #1

Open nvAli opened 3 years ago

nvAli commented 3 years ago

When trying to install openglcontext with Python 3 and not having pygame installed causes issues like

byte-compiling build\bdist.win-amd64\egg\OpenGLContext\pygamecontext.py to pygamecontext.cpython-38.pyc
  File "build\bdist.win-amd64\egg\OpenGLContext\pygamecontext.py", line 12
    raise ImportError, "The pygame package is required for the Pygame GL Context"
                     ^
SyntaxError: invalid syntax
samlaf commented 3 years ago

Also getting similar issues when trying to install openglcontext from pypi. When running shader_1.py, getting

t = time.clock() AttributeError: module 'time' has no attribute 'clock'

Would be nice if this repo would be updated for Python3. Unfortunately there is no alternative right now. The only other pyopengl tutorial (https://pythonprogramming.net/opengl-rotating-cube-example-pyopengl-tutorial/) uses the old pre-shader syntax. :(