MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / gather

Method gather

tools/python-3.11.9-amd64/Lib/curses/textpad.py:160–175  ·  view source on GitHub ↗

Collect and return the contents of the window.

(self)

Source from the content-addressed store, hash-verified

158 return 1
159
160 def gather(self):
161 "Collect and return the contents of the window."
162 result = ""
163 self._update_max_yx()
164 for y in range(self.maxy+1):
165 self.win.move(y, 0)
166 stop = self._end_of_line(y)
167 if stop == 0 and self.stripspaces:
168 continue
169 for x in range(self.maxx+1):
170 if self.stripspaces and x > stop:
171 break
172 result = result + chr(curses.ascii.ascii(self.win.inch(y, x)))
173 if self.maxy > 0:
174 result = result + "\n"
175 return result
176
177 def edit(self, validate=None):
178 "Edit in the widget window and collect the results."

Callers 5

editMethod · 0.95
_cancel_all_tasksFunction · 0.80
communicateMethod · 0.80
shutdown_asyncgensMethod · 0.80
create_serverMethod · 0.80

Calls 3

_update_max_yxMethod · 0.95
_end_of_lineMethod · 0.95
moveMethod · 0.45

Tested by

no test coverage detected