1
0

plugin handler

This commit is contained in:
thomasv
2013-03-02 16:29:14 +01:00
parent d2aefb387b
commit ada36b2554
4 changed files with 58 additions and 5 deletions

View File

@@ -158,6 +158,11 @@ class Console(QtGui.QPlainTextEdit):
for i in range(len(self.prompt) + position):
self.moveCursor(QtGui.QTextCursor.Right)
def register_command(self, c, func):
methods = { c: func}
self.updateNamespace(methods)
def runCommand(self):
command = self.getCommand()
self.addToHistory(command)