|
|
@ -175,12 +175,6 @@ class Console(QtWidgets.QPlainTextEdit): |
|
|
|
else: |
|
|
|
return command |
|
|
|
|
|
|
|
def getHistory(self): |
|
|
|
return self.history |
|
|
|
|
|
|
|
def setHistory(self, history): |
|
|
|
self.history = history |
|
|
|
|
|
|
|
def addToHistory(self, command): |
|
|
|
if command[0:1] == ' ': |
|
|
|
return |
|
|
@ -212,11 +206,6 @@ class Console(QtWidgets.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) |
|
|
|