Skip to content
Permalink
Browse files
Merge pull request #462 from MatMatt/master
[sextante] R scripts can now have empty lines
  • Loading branch information
volaya committed Mar 7, 2013
2 parents 90b66dc + 0b6fcda commit 7bc758e6752c4f74b81e57e0e834aaa8c5ec03e6
Showing with 6 additions and 1 deletion.
  1. +6 −1 python/plugins/sextante/r/RAlgorithm.py
@@ -97,9 +97,10 @@ def defineCharacteristicsFromFile(self):
filename = os.path.basename(self.descriptionFile)
self.name = filename[:filename.rfind(".")].replace("_", " ")
self.group = "User R scripts"
ender = 0
lines = open(self.descriptionFile)
line = lines.readline().strip("\n").strip("\r")
while line != "":
while ender < 10:
if line.startswith("##"):
try:
self.processParameterLine(line)
@@ -112,6 +113,10 @@ def defineCharacteristicsFromFile(self):
self.addOutput(OutputHTML(RAlgorithm.R_CONSOLE_OUTPUT, "R Console Output"))
self.showConsoleOutput = True
else:
if line == '':
ender += 1
else:
ender=0
self.commands.append(line)
self.script += line + "\n"
line = lines.readline().strip("\n").strip("\r")

0 comments on commit 7bc758e

Please sign in to comment.