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

scene.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
scene.c from the Redbook examples.  
......
60 60
  from OpenGL.GLUT import *
61 61
  from OpenGL.GL import *
62 62
except:
63
  print '''
63
  print('''
64 64
ERROR: PyOpenGL not installed properly.  
65
        '''
65
        ''')
66 66
  sys.exit()
67 67

  
68 68

  
......
124 124

  
125 125

  
126 126
def keyboard(key, x, y):
127
   if key == chr(27):
127
   if key == str.encode(chr(27)):
128 128
       sys.exit(0)
129 129
   
130 130

  
......
136 136
glutInit(sys.argv)
137 137
glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB | GLUT_DEPTH)
138 138
glutInitWindowSize (500, 500)
139
glutCreateWindow('scene')
139
glutCreateWindow(b'scene')
140 140
init()
141 141
glutReshapeFunc(reshape)
142 142
glutKeyboardFunc(keyboard)

Formats disponibles : Unified diff