Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #3493 from rldhont/processing_rscripts_temprscritp…
…filename

[Processing][Rscripts] Use temp script filename
  • Loading branch information
volaya committed Sep 29, 2016
2 parents 6b27994 + 4feeab8 commit 170ff9f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion python/plugins/processing/algs/r/RUtils.py
Expand Up @@ -45,6 +45,8 @@ class RUtils(object):
R_USE64 = 'R_USE64'
R_LIBS_USER = 'R_LIBS_USER'

rscriptfilename = userFolder() + os.sep + 'processing_script.r'

@staticmethod
def RFolder():
folder = ProcessingConfig.getSetting(RUtils.R_FOLDER)
Expand Down Expand Up @@ -108,14 +110,17 @@ def createRScriptFromRCommands(commands):

@staticmethod
def getRScriptFilename():
return userFolder() + os.sep + 'processing_script.r'
return RUtils.rscriptfilename

@staticmethod
def getConsoleOutputFilename():
return RUtils.getRScriptFilename() + '.Rout'

@staticmethod
def executeRAlgorithm(alg, progress):
# generate new R script file name in a temp folder
RUtils.rscriptfilename = getTempFilenameInTempFolder('processing_script.r')
# run commands
RUtils.verboseCommands = alg.getVerboseCommands()
RUtils.createRScriptFromRCommands(alg.getFullSetOfRCommands())
if isWindows():
Expand Down

0 comments on commit 170ff9f

Please sign in to comment.