Showing with 6 additions and 1 deletion.
  1. +6 −1 python/plugins/sextante/r/RAlgorithm.py
7 changes: 6 additions & 1 deletion python/plugins/sextante/r/RAlgorithm.py
Original file line number Diff line number Diff line change
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