Skip to content
Permalink
Browse files

Cleaning the code

  • Loading branch information
slarosa committed Sep 25, 2012
1 parent 59ff69e commit a0566c79b79d0f1132a52afc848edaa325836a21
Showing with 0 additions and 4 deletions.
  1. +0 −4 python/console_sci.py
@@ -315,14 +315,12 @@ def updateHistory(self, command):
self.historyIndex = len(self.history)

def writeHistoryFile(self):
#hystoryFile = os.path.join(str(QDir.homePath()),".qgis","console_history.txt")
wH = open(_historyFile, 'w')
for s in self.history:
wH.write(s + '\n')
wH.close()

def readHistoryFile(self):
#hystoryFile = os.path.join(str(QDir.homePath()),".qgis","console_history.txt")
fileExist = QFile.exists(_historyFile)
if fileExist:
rH = open(_historyFile, 'r')
@@ -505,11 +503,9 @@ def runCommand(self, cmd):
if cmd == '_save':
self.writeHistoryFile()
print QCoreApplication.translate("PythonConsole", "## History saved successfully ##")
#del self.buffer[-1]
elif cmd == '_clear':
self.clearHistoryFile()
print QCoreApplication.translate("PythonConsole", "## History cleared successfully ##")
#del self.buffer[-1]
output = sys.stdout.get_and_clean_data()
if output:
self.append(output)

0 comments on commit a0566c7

Please sign in to comment.
You can’t perform that action at this time.