mirror of
https://github.com/microsoft/debugpy.git
synced 2025-12-23 08:48:12 +00:00
Fix SyntaxError on inputhookglut.py
This commit is contained in:
parent
b64c597f42
commit
d9ef3ddd2d
1 changed files with 7 additions and 6 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue