1

I have just started to attempt to use the alpha version of pyglet (1.2alpha1) and creating a window i.e.

win = pyglet.window.Window()

causes a syntax error in the pyglet.window on line 133, which is:

from pyglet.gl import gl_info

to be honest... I have no idea what is even going on here because from x import y is valid syntax and I am completely new to pyglet and have only very very basic knowledge of openGL

Thanks in advance

Jon Gibson
  • 11
  • 2

1 Answers1

0

Okay, i found the answer, it turns out that a load of python 2.x code had made it through, things like

print 'string'

and badly defined imports such as

from base import (loads of modules here)

where it should have been

from pyglet.gl.base import (aforementioned modules)

there have been a whole load of these problems, and as such i have given up for now (due to some number followed by an L (I have no experience with python 2.x so i have no idea what the 3.x equivalent is))

Jon Gibson
  • 11
  • 2
  • The use of `L` with an integer value just indicates that it's a long integer in Python 2.x. See [this doc page](http://docs.python.org/2/library/stdtypes.html#typesnumeric) for more specific info. – Michael Schuller Jan 11 '13 at 20:56
  • Thanks, I guess because 3.x doesn't use longs, it should be safe to remove them – Jon Gibson Jan 16 '13 at 21:56
  • Mercifully, Python 3 has made all ints longs, so yeah, you should be okay to remove them. I'm guessing they were only there in the first place for backward-compatibility purposes: http://stackoverflow.com/questions/2104884/how-does-python-manage-int-and-long – Michael Schuller Jan 17 '13 at 18:02