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

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

  
69 69

  
......
98 98
   glMatrixMode(GL_MODELVIEW)
99 99

  
100 100
def keyboard(key, x, y):
101
   if key == chr(27):
101
   if key == str.encode(chr(27)):
102 102
      sys.exit(0)
103 103

  
104 104

  
......
106 106
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB)
107 107
glutInitWindowSize(500, 500) 
108 108
glutInitWindowPosition(100, 100)
109
glutCreateWindow('Smooth')
109
glutCreateWindow(b'Smooth')
110 110
init()
111 111
glutReshapeFunc(reshape)
112 112
glutKeyboardFunc(keyboard)

Formats disponibles : Unified diff