Révision 11 PyOpenGL-Demo/redbook/movelight.py

movelight.py (revision 11)
2 2

  
3 3
# This is statement is required by the build system to query build info
4 4
if __name__ == '__build__':
5
	raise Exception
5
	raise(Exception)
6 6

  
7 7
'''
8 8
Converted to Python 6/00 by Jason Petrone(jp@demonseed.net)
......
70 70
  from OpenGL.GL import *
71 71
  from OpenGL.GLU import *
72 72
except:
73
  print '''
73
  print('''
74 74
ERROR: PyOpenGL not installed properly.  
75
        '''
75
        ''')
76 76
  sys.exit()
77 77

  
78 78

  
......
128 128
       glutPostRedisplay()
129 129

  
130 130
def keyboard(key, x, y):
131
   if key == chr(27):
131
   if key == str.encode(chr(27)):
132 132
       sys.exit(0)
133 133

  
134 134
glutInit(sys.argv)
135 135
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB)
136 136
glutInitWindowSize (500, 500); 
137 137
glutInitWindowPosition(100, 100)
138
glutCreateWindow("movelight")
138
glutCreateWindow(b"movelight")
139 139
init()
140 140
glutDisplayFunc(display)
141 141
glutReshapeFunc(reshape)

Formats disponibles : Unified diff