Fix SyntaxError on inputhookglut.py

This commit is contained in:
Fabio Zadrozny 2019-12-18 13:51:24 -03:00
parent b64c597f42
commit d9ef3ddd2d

View file

@ -46,11 +46,10 @@ from pydev_ipython.inputhook import stdin_ready
# Should probably be an IPython option
glut_fps = 60
# Display mode : double buffeed + rgba + depth
# Should probably be an IPython option
glut_display_mode = (glut.GLUT_DOUBLE |
glut.GLUT_RGBA |
glut.GLUT_RGBA |
glut.GLUT_DEPTH)
glutMainLoopEvent = None
@ -74,32 +73,34 @@ else:
'''Your glut implementation does not allow interactive sessions. '''
'''Consider installing freeglut.''')
#-----------------------------------------------------------------------------
# Callback functions
#-----------------------------------------------------------------------------
def glut_display():
# Dummy display function
pass
def glut_idle():
# Dummy idle function
pass
def glut_close():
# Close function only hides the current window
glut.glutHideWindow()
glutMainLoopEvent()
def glut_int_handler(signum, frame):
# Catch sigint and print the defautl message
signal.signal(signal.SIGINT, signal.default_int_handler)
print '\nKeyboardInterrupt'
print('\nKeyboardInterrupt')
# Need to reprint the prompt at this stage
#-----------------------------------------------------------------------------
# Code
#-----------------------------------------------------------------------------
@ -121,7 +122,7 @@ def inputhook_glut():
# Make sure the default window is set after a window has been closed
if glut.glutGetWindow() == 0:
glut.glutSetWindow( 1 )
glut.glutSetWindow(1)
glutMainLoopEvent()
return 0