Skip to content

Commit

Permalink
forced output log filename in R
Browse files Browse the repository at this point in the history
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 6d6331d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/sextante/r/RUtils.py
Expand Up @@ -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 = []
Expand Down

0 comments on commit 6d6331d

Please sign in to comment.