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

teapots.py (revision 11)
52 52
  from OpenGL.GL import *
53 53
  from OpenGL.GLU import *
54 54
except:
55
  print '''
55
  print('''
56 56
ERROR: PyOpenGL not installed properly.  
57
        '''
57
        ''')
58 58
  sys.exit()
59 59

  
60 60
teapotList = None
......
189 189

  
190 190

  
191 191
def keyboard(key, x, y):
192
   if key == chr(27):
192
   if key == str.encode(chr(27)):
193 193
      sys.exit(0)
194 194

  
195 195
# Main Loop 
......
198 198
	glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);
199 199
	glutInitWindowSize(500, 600);
200 200
	glutInitWindowPosition(50,50);
201
	glutCreateWindow(sys.argv[0]);
201
	glutCreateWindow(str.encode(sys.argv[0]));
202 202
	glutReshapeFunc(reshape)
203 203
	glutDisplayFunc(display)
204 204
	glutKeyboardFunc(keyboard)

Formats disponibles : Unified diff