[PyOpenGL-Users] Beginners question -- How to end OpenGLContext examples
Brought to you by:
mcfletch
From: Lothar B. <bi...@en...> - 2003-02-14 20:38:50
|
Hi, is there a decent way to end the examples in OpenGLContext/tests, like pressing 'Esc' or 'q'? So far I only managed to kill python :-( I tried to add in OnInit of the TexContext class self.addEventHandler( 'keypress', name = 'q', \ function = self.OnQuit ) and defined in the TestContext class: def OnQuit(self, event): # does not work so far import sys sys.exit() However, this does not work. The preferred context startet is a wxGLCanvas. Any help appreciated Lothar |