Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 7bc758e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion python/plugins/sextante/r/RAlgorithm.py
Expand Up @@ -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)
Expand All @@ -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")
Expand Down

0 comments on commit 7bc758e

Please sign in to comment.