changeset 981:841dd63c76e0

added help message to glviewer
author James Bergstra <bergstrj@iro.umontreal.ca>
date Mon, 10 May 2010 00:26:48 -0400
parents 62b65651f312
children 3463c1761a94
files pylearn/dataset_ops/glviewer.py
diffstat 1 files changed, 17 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/pylearn/dataset_ops/glviewer.py	Thu Apr 15 10:08:57 2010 -0400
+++ b/pylearn/dataset_ops/glviewer.py	Mon May 10 00:26:48 2010 -0400
@@ -155,6 +155,7 @@
         #      dimensions
 
         global window
+        self.print_key_help()
         glutInit(sys.argv)
 
         # Select type of Display mode:   
@@ -366,6 +367,22 @@
         elif args[0] == ESCAPE or args[0]=='q':
             sys.exit()
 
+    def print_key_help(self):
+        print "Program controls:"
+        print "  q: quit"
+        print ""
+        print "Example controls:"
+        print "  0: reset to example 0"
+        print "  j: next"
+        print "  k: prev"
+        print ""
+        print "Frame controls (for movies)"
+        print "  ): reset to frame 0"
+        print "  J: forward"
+        print "  K: backward"
+        print "Hint: Hold keys down for continuous play"
+        print ""
+
 
 if __name__ == '__main__':