MCPcopy Index your code
hub / github.com/python/cpython / gather

Method gather

Lib/curses/textpad.py:163–178  ·  view source on GitHub ↗

Collect and return the contents of the window.

(self)

Source from the content-addressed store, hash-verified

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

Callers 5

editMethod · 0.95
_cancel_all_tasksFunction · 0.45
communicateMethod · 0.45
shutdown_asyncgensMethod · 0.45
create_serverMethod · 0.45

Calls 3

_update_max_yxMethod · 0.95
_end_of_lineMethod · 0.95
moveMethod · 0.45

Tested by

no test coverage detected