Skip to content

Commit 24c0508

Browse files
author
stephanie
committed
change type of line splitting
1 parent c868a2d commit 24c0508

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

odmtools/gui/pnlScript.py

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -165,22 +165,27 @@ def runCommand(self, text):
165165
# get ahold of record service and turn it off do i need a publisher command?
166166

167167
self.parent.record_service.toggle_record(False)
168-
for line in text.split("\n"):
168+
for line in text.splitlines():#("\n"):
169169
self.console.shell.run(line)
170170
#self.console.shell.run("\n")
171171
self.parent.record_service.toggle_record(True)
172172
#restart recording
173173

174174
def OnExecute(self, e):
175-
# self.runCommand(self.control.GetText())
176-
for l in self.control.GetText().split('\n'):
177-
self.runCommand(l)
175+
self.runCommand(self.control.GetText())
176+
177+
# l1 = len(self.control.GetText().split('\n'))
178+
# l2 = len(self.control.GetText().split('\r'))
179+
#
180+
# print("length by '\\n': %s \n length by '\\r': %s"%(l1,l2))
181+
# for l in self.control.GetText().split('\n'):
182+
# self.runCommand(l)
178183

179184

180185
def OnExecuteSelection(self, e):
181-
# self.runCommand(self.control.GetSelectedTextRaw())
182-
for l in self.control.GetSelectedTextRaw().split('\n'):
183-
self.runCommand(l)
186+
self.runCommand(self.control.GetSelectedTextRaw())
187+
# for l in self.control.GetSelectedTextRaw().split('\n'):
188+
# self.runCommand(l)
184189

185190
def OnExecuteLine(self, e):
186191
text = self.control.GetSelectedTextRaw()

0 commit comments

Comments
 (0)