Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
R script execution log information: commands and console output.
git-svn-id: http://sextante.googlecode.com/svn/trunk/soft/bindings/qgis-plugin@346 881b9c09-3ef8-f3c2-ec3d-21d735c97f4d
  • Loading branch information
cpolymeris@gmail.com committed Aug 10, 2012
1 parent 2aa1c70 commit cf2fca0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/sextante/r/RAlgorithm.py
Expand Up @@ -177,8 +177,10 @@ def processAlgorithm(self, progress):
loglines = []
loglines.append("R execution commands")
loglines += self.getFullSetOfRCommands()
for line in loglines:
progress.setCommand(line)
SextanteLog.addToLog(SextanteLog.LOG_INFO, loglines)
RUtils.executeRAlgorithm(self)
RUtils.executeRAlgorithm(self, progress)
if self.showPlots:
htmlfilename = self.getOutputValue(RAlgorithm.RPLOTS)
f = open(htmlfilename, "w")
Expand Down
4 changes: 3 additions & 1 deletion src/sextante/r/RUtils.py
Expand Up @@ -47,7 +47,7 @@ def getConsoleOutputFilename():


@staticmethod
def executeRAlgorithm(alg):
def executeRAlgorithm(alg, progress):
RUtils.verboseCommands = alg.getVerboseCommands();
RUtils.createRScriptFromRCommands(alg.getFullSetOfRCommands())
if SextanteUtils.isWindows():
Expand All @@ -64,6 +64,8 @@ def executeRAlgorithm(alg):
loglines = []
loglines.append("R execution console output")
loglines += RUtils.allConsoleResults
for line in loglines:
progress.setConsoleInfo(line)
SextanteLog.addToLog(SextanteLog.LOG_INFO, loglines)

@staticmethod
Expand Down

0 comments on commit cf2fca0

Please sign in to comment.