help for functions
authorecdsa <ecdsa@github>
Mon, 4 Mar 2013 16:47:51 +0000 (17:47 +0100)
committerecdsa <ecdsa@github>
Mon, 4 Mar 2013 16:47:51 +0000 (17:47 +0100)
gui/qt_console.py

index 471a740..123c0c8 100644 (file)
@@ -191,6 +191,11 @@ class Console(QtGui.QPlainTextEdit):
                         QtCore.QCoreApplication.processEvents()
                     self.skip = not self.skip
 
+            if type(self.namespace.get(command)) == type(lambda:None):
+                self.appendPlainText("'%s' is a function. Type '%s()' to call it."%(command, command))
+                self.newPrompt()
+                return
+
             sys.stdout = stdoutProxy(self.appendPlainText)
             try:
                 try: