Skip to content
Permalink
Browse files
forced output log filename in R
git-svn-id: http://sextante.googlecode.com/svn/trunk/soft/bindings/qgis-plugin@177 881b9c09-3ef8-f3c2-ec3d-21d735c97f4d
  • Loading branch information
volayaf committed May 9, 2012
1 parent 16708cd commit 6d6331d683a116119565733e62a148687d3cead7
Showing with 5 additions and 3 deletions.
  1. +5 −3 src/sextante/r/RUtils.py
@@ -51,12 +51,14 @@ def executeRAlgorithm(alg):
RUtils.verboseCommands = alg.getVerboseCommands();
RUtils.createRScriptFromRCommands(alg.getFullSetOfRCommands())
if SextanteUtils.isWindows():
command = [RUtils.RFolder() + os.sep + "bin" + os.sep + "R.exe", "CMD", "BATCH", "--vanilla", RUtils.getRScriptFilename()]
command = [RUtils.RFolder() + os.sep + "bin" + os.sep + "R.exe", "CMD", "BATCH", "--vanilla",
RUtils.getRScriptFilename(), RUtils.getConsoleOutputFilename()]
else:
os.chmod(RUtils.getRScriptFilename(), stat.S_IEXEC | stat.S_IREAD | stat.S_IWRITE)
command = ["R", "CMD", "BATCH", "--vanilla", RUtils.getRScriptFilename()]
command = ["R", "CMD", "BATCH", "--vanilla", RUtils.getRScriptFilename(), RUtils.getConsoleOutputFilename()]

proc = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stdin=subprocess.PIPE,stderr=subprocess.STDOUT, universal_newlines=True)
proc = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stdin=subprocess.PIPE,stderr=subprocess.STDOUT,
universal_newlines=True)
proc.wait()
RUtils.createConsoleOutput()
loglines = []

0 comments on commit 6d6331d

Please sign in to comment.